use of org.talend.esb.policy.compression.impl.CompressionOutInterceptor.CompressionCachedOutputStreamCallback in project tesb-rt-se by Talend.
the class CompressionOutInterceptorTest method handleRuntimeException2.
@Test
public void handleRuntimeException2() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
map.put(Message.HTTP_REQUEST_METHOD, "GET");
Message message = CompressionCommonTest.getMessageStub(null, map);
ByteArrayOutputStream os = new ByteArrayOutputStream();
CompressionCachedOutputStreamCallback callback = new CompressionCachedOutputStreamCallback(os, 1024, message);
CachedOutputStream wrapper = new CachedOutputStream();
try {
callback.onClose(wrapper);
} catch (RuntimeException ex) {
return;
}
fail("No exception is not expected");
}
Aggregations