### Question:
SubjectFeatureDefinitionProvider implements AutoCloseable { @Override public void close() { deleteSubjectFeatureDefinitions(); } SubjectFeatureDefinitionProvider(DataBroker dataProvider); @Override void close();  }### Answer:
@Test public void testClose() throws Exception { doNothing().when(writeTransaction).delete(eq(LogicalDatastoreType.CONFIGURATION), any(InstanceIdentifier.class)); when(dataProvider.newWriteOnlyTransaction()).thenReturn(writeTransaction); SubjectFeatureDefinitionProvider provider = new SubjectFeatureDefinitionProvider(dataProvider); assertNotNull(provider); provider.close(); verify(dataProvider, times(2)).newWriteOnlyTransaction(); verify(writeTransaction, times(NUM_OF_SUBJECT_FEATURE_DEFINITIONS)) .delete(eq(LogicalDatastoreType.CONFIGURATION), any(InstanceIdentifier.class)); }