### Question:
ApiWatch { public String buildResponse() throws JsonProcessingException { return buildResponse(null); } ApiWatch(ApimAdapterConfig adapterConfig, OfflineConfigurationCacheRepo offlineConfigurationCacheRepo, TokenToParsedTokenCache tokenToParsedTokenCache, OperationMode operationMode); boolean isApiWatchRequest(String token, HttpMethod httpMethod); boolean isApiWatchRequest(String token, String httpMethod); boolean isApiWatchRequest(OAuthToken token, String httpMethod); void writeResponse(HttpServletResponse httpResponse); String buildResponse(); String buildResponse(String responseContent); String pingBackend(String token, String targetUrl); static final int HTTP_STATUS_OK; static final String RESPONSE_CONTENT_TYPE; static final String QUERY_PARAM_NAME_TARGET_URL; }### Answer:
@Test public void buildResponse() throws JsonProcessingException { WireMock.reset(); StubGenerator.instantiateStubForSbbPublicTokenIssuer(); StubGenerator.instantiateStubForSbbPublicTokenIssuerJwks(); final TokenToParsedTokenCache tokenToParsedTokenCache = new TokenToParsedTokenCache(apimAdapterConfig, restConfig, OfflineConfigurationCacheRepo.disabled()); final ApiWatch apiWatch = new ApiWatch(apimAdapterConfig, OfflineConfigurationCacheRepo.disabled(), tokenToParsedTokenCache, OperationMode.ADAPTER_JAVA); final String resp = apiWatch.buildResponse("-"); assertTrue(resp.contains("\"operationMode\":\"ADAPTER_JAVA\"")); assertTrue(resp.contains("\"offlineConfigurationCache\":\"DISABLED\"")); assertTrue(resp.contains("\"backendResponse\":\"-\"")); }