</BUG>
EntityInfo info = EntityInfos.infoFor(clazz);
if (info.single()) {
return getObject(info.endpoint(), info.topLevelName(), clazz)
<BUG>.thenApply(Lists::newArrayList);
</BUG>
} else {
return getList(info.endpoint(), info.topLevelName(), clazz);
}
}

.withSubstitutionNote("Zabrakło śledzi")
.withOrgTeacher(repository.getList(Teacher.class).get(3).id())
.withOrgSubject(repository.getList(Subject.class).get(3).id())
.withOrgDate(LocalDate.parse("2017-01-01"));
}
public <T extends Persistable> Single<List<T>> getAll(Class<T> clazz) {
EntityInfo info = EntityInfos.infoFor(clazz);
if (info.single()) {
return getObject(info.endpoint(), info.topLevelName(), clazz)
.map(Lists::newArrayList);
} else {
return getList(info.endpoint(), info.topLevelName(), clazz);
}
}
