### Question:
NetworkAdapterResources { public Optional<UpdateNetworkResponse> updateNetwork(RequestContext requestContext, CloudRegion cloudRegion, OrchestrationContext orchestrationContext, ServiceInstance serviceInstance, L3Network l3Network, Map<String, String> userInput, Customer customer) throws UnsupportedEncodingException, NetworkAdapterClientException { UpdateNetworkRequest updateNetworkRequest = networkAdapterObjectMapper.createNetworkUpdateRequestMapper( requestContext, cloudRegion, orchestrationContext, serviceInstance, l3Network, userInput, customer); return Optional.of(networkAdapterClient.updateNetwork(l3Network.getNetworkId(), updateNetworkRequest)); }  Optional<CreateNetworkResponse> createNetwork(RequestContext requestContext, CloudRegion cloudRegion,
            OrchestrationContext orchestrationContext, ServiceInstance serviceInstance, L3Network l3Network,
            Map<String, String> userInput, String cloudRegionPo, Customer customer); Optional<RollbackNetworkResponse> rollbackCreateNetwork(RequestContext requestContext,
            CloudRegion cloudRegion, OrchestrationContext orchestrationContext, ServiceInstance serviceInstance,
            L3Network l3Network, Map<String, String> userInput, String cloudRegionPo,
            CreateNetworkResponse createNetworkResponse); Optional<UpdateNetworkResponse> updateNetwork(RequestContext requestContext, CloudRegion cloudRegion,
            OrchestrationContext orchestrationContext, ServiceInstance serviceInstance, L3Network l3Network,
            Map<String, String> userInput, Customer customer); Optional<DeleteNetworkResponse> deleteNetwork(RequestContext requestContext, CloudRegion cloudRegion,
            ServiceInstance serviceInstance, L3Network l3Network); Optional<Response> createNetworkAsync(CreateNetworkRequest createNetworkRequest); Optional<Response> deleteNetworkAsync(DeleteNetworkRequest deleteNetworkRequest); Optional<Response> updateNetworkAsync(UpdateNetworkRequest updateNetworkRequest); Optional<RollbackNetworkResponse> rollbackCreateNetwork(String networkId,
            RollbackNetworkRequest rollbackNetworkRequest); Optional<UpdateNetworkResponse> updateNetwork(UpdateNetworkRequest updateNetworkRequest); Optional<DeleteNetworkResponse> deleteNetwork(DeleteNetworkRequest deleteNetworkRequest);  }### Answer:
@Test public void updateNetworkTest() throws UnsupportedEncodingException, NetworkAdapterClientException { doReturn(new UpdateNetworkRequest()).when(MOCK_networkAdapterObjectMapper).createNetworkUpdateRequestMapper( isA(RequestContext.class), isA(CloudRegion.class), isA(OrchestrationContext.class), isA(ServiceInstance.class), isA(L3Network.class), isA(Map.class), isA(Customer.class)); doReturn(new UpdateNetworkResponse()).when(MOCK_networkAdapterClient).updateNetwork(isA(String.class), isA(UpdateNetworkRequest.class)); Optional<UpdateNetworkResponse> actualUpdateNetworkResponse = networkAdapterResources.updateNetwork( requestContext, cloudRegion, orchestrationContext, serviceInstance, l3Network, userInput, customer); verify(MOCK_networkAdapterObjectMapper, times(1)).createNetworkUpdateRequestMapper(requestContext, cloudRegion, orchestrationContext, serviceInstance, l3Network, userInput, customer); verify(MOCK_networkAdapterClient, times(1)).updateNetwork(isA(String.class), isA(UpdateNetworkRequest.class)); assertNotNull(actualUpdateNetworkResponse); }