IkasoaFactoryFactory { public IkasoaFactory getIkasoaDefaultFactory() { return Optional.ofNullable(configurator).map(DefaultIkasoaFactory::new).orElse(new DefaultIkasoaFactory()); }  IkasoaFactory getIkasoaDefaultFactory(); IkasoaFactory getIkasoaNettyFactory(); IkasoaFactory getIkasoaServletFactory();  }
@Test public void testGetIkasoaDefaultFactory() { IkasoaFactoryFactory factory1 = new IkasoaFactoryFactory(); assertNotNull(factory1.getIkasoaDefaultFactory()); IkasoaFactoryFactory factory2 = new IkasoaFactoryFactory(new Configurator()); assertNotNull(factory2.getIkasoaDefaultFactory()); assertTrue(factory1.getIkasoaDefaultFactory() instanceof DefaultIkasoaFactory && factory2.getIkasoaDefaultFactory() instanceof DefaultIkasoaFactory); }