dialogFixture.button("ButtonRemoveProductAreaGroup").requireEnabled();
dialogFixture.button("ButtonRemoveProductAreaGroup").click();
dialogFixture.button("SaveProductionUnit").click();
ProductionUnit productionUnit = new ProductionUnit();
productionUnit.setProductionUnitName("test");
List<ProductionUnit> list = productionUnitManager
.findByObject(productionUnit);
assertNotNull(list);
assertEquals(1, list.size());
productionUnit = list.get(0);
productionUnitManager.lazyLoad(productionUnit, new LazyLoadEnum[][] { {
LazyLoadEnum.PRODUCTION_UNIT_PRODUCT_AREA_GROUPS,
LazyLoadEnum.NONE } });
assertEquals("Takstoler", productionUnit.getArticleType()
.getArticleTypeName());
assertEquals("test", productionUnit.getProductionUnitName());
assertEquals(1, productionUnit.getProductionUnitProductAreaGroups()
.size());
assertEquals("Takstol", productionUnit
.getProductionUnitProductAreaGroups().iterator().next()
.getProductAreaGroup().getProductAreaGroupName());
}