FutureCart extends AbstractCart<K, CompletableFuture<B>, L> implements Supplier<CompletableFuture<B>> { public FutureCart(K k, CompletableFuture<B> v, long expiration) { super(k, v, null, System.currentTimeMillis(),expiration,null,LoadType.FUTURE); Objects.requireNonNull(k); } FutureCart(K k, CompletableFuture<B> v, long expiration);  FutureCart(K k, CompletableFuture<B> v, long creation, long expiration, long priority);  FutureCart(K k, CompletableFuture<B> v, long creation, long expiration,
			Map<String, Object> allProperties, long priority); @Override CompletableFuture<B> get(); @Override Cart<K, CompletableFuture<B>, L> copy(); @Override ScrapConsumer<K, Cart<K, CompletableFuture<B>, L>> getScrapConsumer();  }
@Test public void futureCartTest() { CompletableFuture<String> f1 = new CompletableFuture<>(); CompletableFuture<String> f2 = new CompletableFuture<>(); FutureCart<Integer,String,String> fc1 = new FutureCart<>(1,f1,1); FutureCart<Integer,String,String> fc2 = new FutureCart<>(1,f2,1,0,new HashMap<>(),0); assertNotNull(fc1.getValue()); assertNotNull(fc1.get()); assertNotNull(fc2.getValue()); assertNotNull(fc1.copy()); ScrapConsumer<Integer, Cart<Integer, CompletableFuture<String>, String>> sc1 = fc1.getScrapConsumer(); ScrapBin<Integer,Cart<Integer,CompletableFuture<String>,String>> sb1 = new ScrapBin<>(1,fc1,"test",new Exception("test"), ScrapBin.FailureType.CART_REJECTED,new HashMap<>(),null); ScrapBin<Integer,Cart<Integer,CompletableFuture<String>,String>> sb2 = new ScrapBin<>(1,fc1,"test",null, ScrapBin.FailureType.CART_REJECTED,new HashMap<>(),null); sc1.accept(sb1); sc1.accept(sb2); }