### Question:
AAIVnfResources { public void createLineOfBusinessandConnectVnf(LineOfBusiness lineOfBusiness, GenericVnf vnf) { AAIResourceUri lineOfBusinessURI = AAIUriFactory.createResourceUri( AAIFluentTypeBuilder.business().lineOfBusiness(lineOfBusiness.getLineOfBusinessName())); AAIResourceUri vnfURI = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnf.getVnfId())); injectionHelper.getAaiClient().createIfNotExists(lineOfBusinessURI, Optional.of(lineOfBusiness)).connect(vnfURI, lineOfBusinessURI); }  void createVnfandConnectServiceInstance(GenericVnf vnf, ServiceInstance serviceInstance); void createPlatformandConnectVnf(Platform platform, GenericVnf vnf); void createLineOfBusinessandConnectVnf(LineOfBusiness lineOfBusiness, GenericVnf vnf); void deleteVnf(GenericVnf vnf); void updateOrchestrationStatusVnf(GenericVnf vnf, OrchestrationStatus orchestrationStatus); void updateObjectVnf(GenericVnf vnf); Optional<org.onap.aai.domain.yang.GenericVnf> getGenericVnf(String vnfId); boolean checkInMaintFlag(String vnfId); void connectVnfToCloudRegion(GenericVnf vnf, CloudRegion cloudRegion); void connectVnfToTenant(GenericVnf vnf, CloudRegion cloudRegion); boolean checkVnfClosedLoopDisabledFlag(String vnfId); boolean checkVnfPserversLockedFlag(String vnfId); boolean checkNameInUse(String vnfName); AAIResultWrapper queryVnfWrapperById(GenericVnf vnf); Optional<Vserver> getVserver(AAIResourceUri uri);  }### Answer:
@Test public void createLineOfBusinessandConnectVnfTest() { LineOfBusiness lob = new LineOfBusiness(); lob.setLineOfBusinessName("a123"); doNothing().when(MOCK_aaiResourcesClient).connect(isA(AAIResourceUri.class), isA(AAIResourceUri.class)); doReturn(MOCK_aaiResourcesClient).when(MOCK_aaiResourcesClient).createIfNotExists(isA(AAIResourceUri.class), any(Optional.class)); aaiVnfResources.createLineOfBusinessandConnectVnf(lob, genericVnf); verify(MOCK_aaiResourcesClient, times(1)).connect(any(AAIResourceUri.class), isA(AAIResourceUri.class)); }