@Test public void testResponseExtraFields() throws ControlPointApiException, IOException { final String resJson = "{\"field1\":\"val1\",\"field2\":\"val2\",\"field3\":\"val3\"}"; Mockito.when(defaultHttpClient.execute(Mockito.any())) .thenReturn(buildLoginResponse()) .thenReturn(buildResponse(200, "OK", resJson)); final TestResponse res = defaultCPClient.get("status", Collections.singletonList( new BasicNameValuePair("format", "standard") ), TestResponse.class); final List<HttpUriRequest> requests = getRequests(2); Assert.assertEquals("should ignore extra field", "val1", res.field1); }
public <R> R get( final String path, final List<NameValuePair> queryParams, final Class<R> resultType ) throws ControlPointApiException { return performAuthenticatedRequest(buildGetRequest(path, queryParams), resultType); }
ControlPointApiClient { public <R> R get( final String path, final List<NameValuePair> queryParams, final Class<R> resultType ) throws ControlPointApiException { return performAuthenticatedRequest(buildGetRequest(path, queryParams), resultType); } }
ControlPointApiClient { public <R> R get( final String path, final List<NameValuePair> queryParams, final Class<R> resultType ) throws ControlPointApiException { return performAuthenticatedRequest(buildGetRequest(path, queryParams), resultType); }  }
ControlPointApiClient { public <R> R get( final String path, final List<NameValuePair> queryParams, final Class<R> resultType ) throws ControlPointApiException { return performAuthenticatedRequest(buildGetRequest(path, queryParams), resultType); }  R get(
        final String path,
        final List<NameValuePair> queryParams,
        final Class<R> resultType
    ); R postUrlencoded(
        final String path,
        final List<NameValuePair> queryParams,
        final List<NameValuePair> bodyParams,
        final Class<R> resultType
    ); }
ControlPointApiClient { public <R> R get( final String path, final List<NameValuePair> queryParams, final Class<R> resultType ) throws ControlPointApiException { return performAuthenticatedRequest(buildGetRequest(path, queryParams), resultType); }  R get(
        final String path,
        final List<NameValuePair> queryParams,
        final Class<R> resultType
    ); R postUrlencoded(
        final String path,
        final List<NameValuePair> queryParams,
        final List<NameValuePair> bodyParams,
        final Class<R> resultType
    );  }