Injectable { boolean hasSupplier() { return supplier != null; } Injectable(Class<T> cls, Supplier<T> supplier); Class<T> get(); Supplier<T> supplier(); @Override boolean equals(Object o); @Override int hashCode();  }
@Test void hasSupplierYes() { final Injectable<Integer> injectable = new Injectable<>(Integer.class, SUPPLIER); assertTrue(injectable.hasSupplier()); }
@Test void hasSupplierNo() { final Injectable<Integer> injectable = new Injectable<>(Integer.class, null); assertFalse(injectable.hasSupplier()); }