### Question:
InstancePool { public void prestart(int numInstances) { Parallel.blocking(numInstances, i -> get(i % size())).run(); } InstancePool(int size, Supplier<HazelcastInstance> instanceSupplier); int size(); HazelcastInstance get(); void prestartAll(); void prestart(int numInstances);  }### Answer:
@Test public void testPrestart() { final int size = 4; final Supplier<HazelcastInstance> supplier = Classes.cast(mock(Supplier.class)); when(supplier.get()).thenAnswer(invocation -> mock(HazelcastInstance.class)); final InstancePool pool = new InstancePool(size, supplier); pool.prestartAll(); verify(supplier, times(4)).get(); }