コード例 #1
0
  public void testGetIsDelegated() {
    Factory<String> factory = () -> "Ni";

    scope.get(factory);

    verify(delegateScope).get(factory);
  }
コード例 #2
0
  public void testDeserializedSupplierWillUseStaticallyDeterminedDelegate() throws Exception {
    Supplier<String> supplier = serializeThenDeserialize(scope.apply(() -> "Ni"));

    assertEquals(supplier.get(), "Nu");
  }
コード例 #3
0
 public void testSupplierIsDeserializable() throws Exception {
   serializeThenDeserialize(scope.apply(() -> "Ni"));
 }