ClassifierRspUpdateDataGetter { public List<SclServiceFunctionForwarder> filterClassifierNodesByAclName(String theAclName) { InstanceIdentifier<ServiceFunctionClassifiers> ifConfigIID = InstanceIdentifier.builder(ServiceFunctionClassifiers.class).build(); return Optional.ofNullable(SfcDataStoreAPI.readTransactionAPI(ifConfigIID, LogicalDatastoreType.CONFIGURATION)) .map(ServiceFunctionClassifiers::getServiceFunctionClassifier) .orElse(Collections.emptyList()) .stream() .filter(classifier -> classifier.getAcl().getName().equals(theAclName)) .map(ServiceFunctionClassifier::getSclServiceFunctionForwarder) .findAny() .orElse(Collections.emptyList()); }  List<Acl> filterAclsByRspName(RspName theRspName); List<SclServiceFunctionForwarder> filterClassifierNodesByAclName(String theAclName);  }
@Test public void testClassifierFilteringByAclName() { PowerMockito.when(SfcDataStoreAPI .readTransactionAPI(any(), any())).thenReturn(classifierContainer); when(classifierContainer.getServiceFunctionClassifier()).thenReturn(classifierList); ClassifierRspUpdateDataGetter rspUpdateListener = new ClassifierRspUpdateDataGetter(); Assert.assertFalse(rspUpdateListener.filterClassifierNodesByAclName("acl1").isEmpty()); Assert.assertEquals(1, rspUpdateListener.filterClassifierNodesByAclName("acl1").size()); Assert.assertEquals("c1", rspUpdateListener.filterClassifierNodesByAclName("acl1").get(0).getName()); }