### Question:
AAICreateResources extends AAIResource { public void createAAIOwningEntity(String owningEntityId, String owningEntityName, String serviceInstance) { AAIResourceUri owningEntityURI = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().owningEntity(owningEntityId)); AAIResourceUri serviceInstanceURI = AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstance)); Map<String, String> hashMap = new HashMap<>(); hashMap.put("owning-entity-name", owningEntityName); getAaiClient().createIfNotExists(owningEntityURI, Optional.of(hashMap)).connect(owningEntityURI, serviceInstanceURI); }  void createAAIProject(String projectName, String serviceInstance); void createAAIOwningEntity(String owningEntityId, String owningEntityName, String serviceInstance); boolean existsOwningEntity(String owningEntityId); void connectOwningEntityandServiceInstance(String owningEntityId, String serviceInstance); void createAAIPlatform(String platformName, String vnfId); void createAAILineOfBusiness(String lineOfBusiness, String vnfId); void createAAIServiceInstance(String globalCustomerId, String serviceType, String serviceInstanceId); Optional<GenericVnf> getVnfInstance(String vnfId);  }### Answer:
@Test public void createAAIOwningEntityTest() { doReturn(aaiResourcesClient).when(aaiResourcesClient).createIfNotExists(isA(AAIResourceUri.class), isA(Optional.class)); doNothing().when(aaiResourcesClient).connect(isA(AAIResourceUri.class), isA(AAIResourceUri.class)); aaiCreateResources.createAAIOwningEntity(owningEntityId, owningEntityName, serviceInstanceId); HashMap<String, String> owningEntityMap = new HashMap<>(); owningEntityMap.put("owning-entity-name", owningEntityName); AAIResourceUri owningEntityURI = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().owningEntity(owningEntityId)); verify(aaiResourcesClient, times(1)).createIfNotExists(owningEntityURI, Optional.of(owningEntityMap)); verify(aaiResourcesClient, times(1)).connect(isA(AAIResourceUri.class), isA(AAIResourceUri.class)); }