public static Application copyApplication(Application application) {
        Application copy = new Application(application.getName());
        for (InstanceInfo instance : application.getInstances()) {
            copy.addInstance(instance);
        }
        return copy;
    }
@Test
    public void testCopyApplicationIfNotNullReturnApplication() {
        Application application = createSingleInstanceApp("foo", "foo",
                InstanceInfo.ActionType.ADDED);
        Assert.assertEquals(1,
                EurekaEntityFunctions.copyApplication(application).size());
    }