/** * Tests the implementation of initialize(). * * @throws java.lang.Exception so we don't have to catch it */ @Test public void testInitialize() throws Exception { final TestCallable call = new TestCallable(); final CallableBackgroundInitializer<Integer> init = new CallableBackgroundInitializer<>( call); assertEquals("Wrong result", RESULT, init.initialize()); assertEquals("Wrong number of invocations", 1, call.callCount); }