### Question:
DefaultEntityView implements EntityView { @Override public <K extends Entity.Key<S>, S extends Specification> Stream<Entity<K, S>> all(Class<K> keyClass) { return entities.values().stream() .filter(x -> x.getKey().getClass().equals(keyClass)) .map(x -> (Entity<K, S>) x); } DefaultEntityView(EventReceiver receiver, Map<Entity.Key<?>, Entity<?, ?>> entities);  DefaultEntityView(EventReceiver receiver); @Override CompletableFuture<Void> load(@NonNull EntityViewListener listener); @Override CompletableFuture<Void> load(); @Override Optional<Entity<K, S>> get(K key); @Override Stream<Entity<K, S>> all(Class<K> keyClass);  }### Answer:
@Test public void allAbsent() { var result = underTest.all(DomainKey.class).collect(toList()); assertThat(result.size(), is(0)); }