public static Map<String, InstanceInfo> selectInstancesMappedById(Application application) {
        Map<String, InstanceInfo> result = new HashMap<>();
        for (InstanceInfo instance : application.getInstances()) {
            result.put(instance.getId(), instance);
        }
        return result;
    }
@Test
    public void testSelectInstancesMappedByIdIfNotNullReturnMapOfInstances() {
        Application application = createSingleInstanceApp("foo", "foo",
                InstanceInfo.ActionType.ADDED);
        HashMap<String, InstanceInfo> hashMap = new HashMap<>();
        hashMap.put("foo", application.getByInstanceId("foo"));
        Assert.assertEquals(hashMap,
                EurekaEntityFunctions.selectInstancesMappedById(application));
    }