### Question:
Enforcer { public List<T> absent() { if (this.configured.isEmpty()) { return Collections.emptyList(); } Collection<T> existing = this.existing.get(); return Collections.unmodifiableList( this.configured .stream() .filter(c -> existing.stream().noneMatch(e -> isEqual.test(c, e))) .collect(Collectors.toList()) ); } protected  Enforcer(Collection<T> configured, Supplier<Collection<T>> existing, BiPredicate<T, T> isEqual, boolean safemode); List<T> absent(); List<T> unexpected(); void createAbsent(); void deleteUnexpected(); void enforceAll(); void stats();  }### Answer:
@Test public void testAbsent() { enforcer = new DummyEnforcer(dummies, () -> singletonList(dummies.get(0))); Assert.assertEquals(singletonList(dummies.get(1)), enforcer.absent()); }
@Test public void testAbsentNoneExisting() { enforcer = new DummyEnforcer(dummies, Collections::emptyList); Assert.assertEquals(dummies, enforcer.absent()); }
@Test public void testAbsentNoneConfigured() { enforcer = new DummyEnforcer(emptyList(), () -> dummies); Assert.assertTrue(enforcer.absent().isEmpty()); }