NewRelicClient extends AbstractMetricSourceClient implements MetricSourceClient { @Override public MethodInfoSummarized summarized(final String applicationId, final String className, final String methodName) throws MetricSourceClientException { return metrics(applicationId, className, methodName, true); } NewRelicClient(final String apiKey); @Override MethodInfoSummarized summarized(final String applicationId, final String className, final String methodName);  }
@Test public void testSummarized() throws MetricSourceClientException, IOException { final String url = "https: final String applicationId = "0"; final String className = "my.Class"; final String methodName = "myMethod"; final String response = getResourceAsString(RESPONSE_STUB_PATH); mockServer.expect(requestTo(url)).andExpect(method(HttpMethod.POST)).andRespond(withSuccess(response, MediaType.APPLICATION_JSON)); final MethodInfoSummarized actualResponse = newRelicClient.summarized(applicationId, className, methodName); assertThat(actualResponse).isEqualTo(DtoStubs.METHOD_INFO_SUMARIZED); }