JacksonRequestParamFilter { public ObjectMapper configurePartialResponse(ObjectMapper mapper) { checkNotNull(mapper); MultivaluedMap<String, String> queryParameters = uriInfo.get().getQueryParameters(); String fieldValue = queryParameters.getFirst(fieldName); if (!Strings.isNullOrEmpty(fieldValue)) { JacksonFilters.filterAllOutput(mapper, fieldValue); } return mapper; } @Inject  JacksonRequestParamFilter(Provider<UriInfo> uriInfo);  JacksonRequestParamFilter(Provider<UriInfo> uriInfo, String fieldName); ObjectMapper configurePartialResponse(ObjectMapper mapper); static final String DEFAULT_FIELD_NAME; }
@Test @Parameters(method = "params") public void testConfigurePartialResponse(Params params) { JacksonRequestParamFilter subject = new JacksonRequestParamFilter(params.scopedUriInfo()); ObjectMapper mapper = subject.configurePartialResponse(new ObjectMapper()); if (params.matcher.isPresent()) { assertConfiguredWithMatcher(mapper, params.matcher.get()); } else { assertConfiguredWithoutMatcher(mapper); } }