ResponseModifyingPreprocessors { public static OperationResponsePreprocessor shortenContent(ObjectMapper objectMapper) { return Preprocessors.preprocessResponse(replaceBinaryContent(), limitJsonArrayLength(objectMapper)); }  static OperationResponsePreprocessor shortenContent(ObjectMapper objectMapper); static OperationPreprocessor replaceBinaryContent(); static OperationPreprocessor replaceMultipartBinaryContent(); static OperationPreprocessor limitJsonArrayLength(ObjectMapper objectMapper);  }
@Test public void shouldShortenJsonArraysWithCombinedShortener() { preprocessorTest(new TestData() .content("[1,2,3,4]") .contentType(APPLICATION_JSON_VALUE) .preprocessor(ResponseModifyingPreprocessors.shortenContent(mapper)) .expectedResult("[1,2,3]")); }
@Test public void shouldShortenBinaryContentWithCombinedShortener() { preprocessorTest(new TestData() .content("does not matter") .contentType(IMAGE_PNG_VALUE) .preprocessor(ResponseModifyingPreprocessors.shortenContent(mapper)) .expectedResult("<binary>")); }