@Test public void let_objectReturnedIsTheExpectedOne() { final AtomicReference<SimpleClass> returnedInLet = new AtomicReference<>(); final SimpleClass given = new SimpleClass(); final SimpleClass actual = take(given) .let((simpleObj) -> { final SimpleClass returnedObj = simpleObj.returnNew(); returnedInLet.set(returnedObj); return returnedObj; }) .unwrap(); Assert.assertSame(actual, returnedInLet.get()); Assert.assertNotSame(given, actual); }
public static <T> K2JWrapper<T> take(T object) { return new K2JWrapper<>(object); }
K2JCompat { public static <T> K2JWrapper<T> take(T object) { return new K2JWrapper<>(object); } }
K2JCompat { public static <T> K2JWrapper<T> take(T object) { return new K2JWrapper<>(object); }  }
K2JCompat { public static <T> K2JWrapper<T> take(T object) { return new K2JWrapper<>(object); }  static K2JWrapper<T> take(T object); }
K2JCompat { public static <T> K2JWrapper<T> take(T object) { return new K2JWrapper<>(object); }  static K2JWrapper<T> take(T object);  }