@Test public void testDeleteFeature() { featureContainer.getFeatureDictionary().put("feature1", mockedFeature1); featureContainer.getFeatureStorage().put(mockedFeature1.getFeatureStem(), mockedFeature1); featureContainer.deleteFeature("feature1"); Assert.assertNull(featureContainer.getFeatureDictionary().get("feature1")); }
@Before public void setUp() { ArrayList<String> desc = new ArrayList<String>(); desc.add("testDesc1"); Mockito.when(mockedFeature1.getDistinctDescription()).thenReturn(desc); Mockito.when(mockedFeature1.getLabel()).thenReturn("Feature1"); Mockito.when(mockedFeature1.getFeatureStem()).thenReturn("FeatureStem1"); mockedFeature2.setLabel("Feature2"); options = Mockito.mock(OptionTransferObject.class); featureContainer = new FeatureContainer(); featureContainer.setOptions(options); }