### Question:
GovernanceEngineRESTServices { public GovernedAssetListResponse getGovernedAssets(String serverName, String userId, List<String> entityTypes, Integer offset, Integer pageSize) { String methodName = "getGovernedAssets"; GovernedAssetListResponse response = new GovernedAssetListResponse(); try { GovernedAssetHandler governedAssetHandler = instanceHandler.getGovernedAssetHandler(userId, serverName, methodName); response.setGovernedAssetList(governedAssetHandler.getGovernedAssets(userId, entityTypes, offset, pageSize)); } catch (org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException e) { restExceptionHandler.captureInvalidParameterException(response, e); } catch (org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException e) { restExceptionHandler.captureUserNotAuthorizedException(response, e); } catch (org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException e) { restExceptionHandler.capturePropertyServerException(response, e); } return response; }  GovernedAssetListResponse getGovernedAssets(String serverName, String userId, List<String> entityTypes, Integer offset, Integer pageSize); GovernedAssetResponse getGovernedAsset(String serverName, String userId, String assetGuid); StringResponse createSoftwareServer(String serverName, String userId, SoftwareServerCapabilityRequestBody requestBody); SoftwareServerCapabilityResponse getSoftwareServerByGUID(String serverName, String userId, String guid);  }### Answer:
@Test public void testGetGovernedAssets() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { when(instanceHandler.getGovernedAssetHandler(USER, SERVER_NAME, "getGovernedAssets")) .thenReturn(governedAssetHandler); List<GovernedAsset> response = mockGovernedAssetList(); when(governedAssetHandler .getGovernedAssets(USER, Arrays.asList(SCHEMA_ELEMENT), OFFSET, PAGE_SIZE)) .thenReturn(response); GovernedAssetListResponse governedAssets = governanceEngineRESTServices.getGovernedAssets(SERVER_NAME, USER, Arrays.asList(SCHEMA_ELEMENT), OFFSET, PAGE_SIZE); assertEquals(1, governedAssets.getGovernedAssetList().size()); assertEquals(response, governedAssets.getGovernedAssetList()); }