### Question:
VrfValidation { protected void aaiAggregateRouteValidation(org.onap.aai.domain.yang.L3Network aaiLocalNetwork) throws VrfBondingServiceException { if (aaiLocalNetwork.getAggregateRoutes() == null || aaiLocalNetwork.getAggregateRoutes().getAggregateRoute() == null) { return; } if (aaiLocalNetwork.getAggregateRoutes().getAggregateRoute().size() == 1 && !aaiLocalNetwork .getAggregateRoutes().getAggregateRoute().get(0).getIpVersion().equalsIgnoreCase("4")) { throw new VrfBondingServiceException("LocalNetwork: " + aaiLocalNetwork.getNetworkId() + " has 1 aggregate route but the Ip version of aggregate route is : " + aaiLocalNetwork.getAggregateRoutes().getAggregateRoute().get(0).getIpVersion() + " and is not 4"); } else if (aaiLocalNetwork.getAggregateRoutes().getAggregateRoute().size() == 2 && !ipVersionValidation(aaiLocalNetwork.getAggregateRoutes().getAggregateRoute().get(0).getIpVersion(), aaiLocalNetwork.getAggregateRoutes().getAggregateRoute().get(1).getIpVersion())) { throw new VrfBondingServiceException("LocalNetwork: " + aaiLocalNetwork.getNetworkId() + " has 2 aggregate routes but the combination of the Ip versions for the aggregate routes did not match the ip version of one of them to be 4 and one to be 6"); } else if (aaiLocalNetwork.getAggregateRoutes().getAggregateRoute().size() > 2) { throw new VrfBondingServiceException( "LocalNetwork: " + aaiLocalNetwork.getNetworkId() + " either has more than 2 aggregate routes"); } }  void setBbInputSetupUtils(BBInputSetupUtils bbInputSetupUtils);  }### Answer:
@Test public void testAaiAggregateRouteValidation() throws VrfBondingServiceException { org.onap.aai.domain.yang.L3Network aaiLocalNetwork = new org.onap.aai.domain.yang.L3Network(); aaiLocalNetwork.setAggregateRoutes(new AggregateRoutes()); aaiLocalNetwork.getAggregateRoutes().getAggregateRoute().add(new AggregateRoute()); aaiLocalNetwork.getAggregateRoutes().getAggregateRoute().get(0).setIpVersion("4"); ExpectedException.none(); vrfValidation.aaiAggregateRouteValidation(aaiLocalNetwork); aaiLocalNetwork.getAggregateRoutes().getAggregateRoute().add(new AggregateRoute()); aaiLocalNetwork.getAggregateRoutes().getAggregateRoute().get(1).setIpVersion("6"); ExpectedException.none(); vrfValidation.aaiAggregateRouteValidation(aaiLocalNetwork); aaiLocalNetwork.setAggregateRoutes(null); ExpectedException.none(); vrfValidation.aaiAggregateRouteValidation(aaiLocalNetwork); }