@Test public void testProcessShouldSetNotBodyWhenFIDecompressionNotNeeded() throws ApplicationException { given(entity.getHeader(CONTENT_TYPE)).willReturn("xml"); given(entity.getInputStream()).willReturn(inputStream); given(fastinfosetDecompressor.decompress(inputStream)).willReturn(body); underTest.process(entity); verify(entity, never()).setBody(body.toString()); }
@Override public void process(final WilmaHttpEntity entity) { if (isContentFISCompressed(entity)) { ByteArrayOutputStream compressedBody = fastinfosetDecompressor.decompress(entity.getInputStream()); entity.setBody(compressedBody.toString()); } }
FastInfosetDecompressorProcessor extends ProcessorBase { @Override public void process(final WilmaHttpEntity entity) { if (isContentFISCompressed(entity)) { ByteArrayOutputStream compressedBody = fastinfosetDecompressor.decompress(entity.getInputStream()); entity.setBody(compressedBody.toString()); } } }
FastInfosetDecompressorProcessor extends ProcessorBase { @Override public void process(final WilmaHttpEntity entity) { if (isContentFISCompressed(entity)) { ByteArrayOutputStream compressedBody = fastinfosetDecompressor.decompress(entity.getInputStream()); entity.setBody(compressedBody.toString()); } }  }
FastInfosetDecompressorProcessor extends ProcessorBase { @Override public void process(final WilmaHttpEntity entity) { if (isContentFISCompressed(entity)) { ByteArrayOutputStream compressedBody = fastinfosetDecompressor.decompress(entity.getInputStream()); entity.setBody(compressedBody.toString()); } }  @Override void process(final WilmaHttpEntity entity); }
FastInfosetDecompressorProcessor extends ProcessorBase { @Override public void process(final WilmaHttpEntity entity) { if (isContentFISCompressed(entity)) { ByteArrayOutputStream compressedBody = fastinfosetDecompressor.decompress(entity.getInputStream()); entity.setBody(compressedBody.toString()); } }  @Override void process(final WilmaHttpEntity entity);  }