/** * Checks the construction of a PlantComposite. Its properties inherited from PlantComponent * should be their defaults, and its child component lists should be empty and not null. */ @Test public void checkConstruction() { // Create a composite to test. PlantComposite composite = new PlantComposite(); // Check the name, ID, and description. assertEquals("Plant Composite 1", composite.getName()); assertEquals(1, composite.getId()); assertEquals("Container for plant-level reactor components", composite.getDescription()); // The current set of components in the Composite should be empty. assertEquals(0, composite.getNumberOfComponents()); assertNotNull(composite.getComponents()); assertTrue(composite.getComponents().isEmpty()); assertNotNull(composite.getPlantComponents()); assertTrue(composite.getPlantComponents().isEmpty()); return; }