VNMappingUnit implements AutoCloseable { private boolean checkAttributeMatchPatternSpecified(List<AttributeMatchPatterns.AttributeMatchPattern> attributeMatchPatterns, PhysicalResourceRequirement.AttributeMatchPattern attributeMatchPattern) { for ( AttributeMatchPatterns.AttributeMatchPattern attributeMatchPattern1 : attributeMatchPatterns ) { if ( attributeMatchPattern1.name().equals(attributeMatchPattern.name()) ) { return true; } } return false; } VNMappingUnit(DataBroker dataBroker,
                         PNComputationUnit pnComputationUnit,
                         PNResourcesTracker pnResourcesTracker); void virtualNetworkMapping(VirtualNetwork virtualNetwork, UserVnPnMapping userVnPnMapping,
                                      List<PhysicalPath> physicalPaths); void virtualNetworkMapping(VirtualNetwork virtualNetwork, List<VirtualLink> unmappedVirtualLinks,
                                      UserVnPnMapping userVnPnMapping, List<PhysicalPath> physicalPaths); @Override void close();  }
@Test public void testCheckAttributeMatchPatternSpecified() throws Exception { method = class1.getDeclaredMethod("checkAttributeMatchPatternSpecified",new Class[]{ List.class, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.generic.virtual.network.rev151010.virtual.node.instance.PhysicalResourceRequirement.AttributeMatchPattern.class }); method.setAccessible(true); AttributeMatchPatterns.AttributeMatchPattern matchPattern = AttributeMatchPatterns.AttributeMatchPattern.LessThan; List<AttributeMatchPatterns.AttributeMatchPattern> attributeMatchPatterns = new ArrayList<AttributeMatchPatterns.AttributeMatchPattern>(); org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.generic.virtual.network.rev151010.virtual.node.instance.PhysicalResourceRequirement.AttributeMatchPattern attributeMatchPattern = org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.generic.virtual.network.rev151010.virtual.node.instance.PhysicalResourceRequirement.AttributeMatchPattern.LessThan; attributeMatchPatterns.add(matchPattern); Assert.assertTrue((boolean)method.invoke(vnMappingUnit,attributeMatchPatterns,attributeMatchPattern)); }