public static Applications toApplications(Map<String, Application> applicationMap) {
        Applications applications = new Applications();
        for (Application application : applicationMap.values()) {
            applications.addApplication(application);
        }
        return updateMeta(applications);
    }
@Test
    public void testToApplicationsIfNotNullReturnApplicationsFromInstances() {
        InstanceInfo instanceInfo1 = createSingleInstanceApp("foo", "foo",
                InstanceInfo.ActionType.ADDED).getByInstanceId("foo");
        InstanceInfo instanceInfo2 = createSingleInstanceApp("bar", "bar",
                InstanceInfo.ActionType.ADDED).getByInstanceId("bar");
        InstanceInfo instanceInfo3 = createSingleInstanceApp("baz", "baz",
                InstanceInfo.ActionType.ADDED).getByInstanceId("baz");
        Assert.assertEquals(3, EurekaEntityFunctions.toApplications(
                instanceInfo1, instanceInfo2, instanceInfo3).size());
    }