@Test public void testInitThrowException() throws Exception { ProductLineConfigManager manager = new MockProductLineConfigManager(); ((MockProductLineConfigManager) manager).setConfigDao(new MockConfigDao2()); try { manager.initialize(); } catch (Exception e) { } Company config = manager.getCompany(); Assert.assertEquals(0, config.getProductLines().size()); }
@Override public Config findByName(String name, Readset<Config> readset) throws DalException { Config config = new Config(); config.setName(name); Company company = new Company(); ProductLine productLine = new ProductLine("Test"); company.addProductLine(productLine); config.setContent(company.toString()); config.setModifyDate(new Date()); return config; }