summaryrefslogtreecommitdiffstats
path: root/simple/simple-http/src/test/java/org/simpleframework/http/core/ProducerExceptionTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'simple/simple-http/src/test/java/org/simpleframework/http/core/ProducerExceptionTest.java')
-rw-r--r--simple/simple-http/src/test/java/org/simpleframework/http/core/ProducerExceptionTest.java23
1 files changed, 23 insertions, 0 deletions
diff --git a/simple/simple-http/src/test/java/org/simpleframework/http/core/ProducerExceptionTest.java b/simple/simple-http/src/test/java/org/simpleframework/http/core/ProducerExceptionTest.java
new file mode 100644
index 0000000..d81370e
--- /dev/null
+++ b/simple/simple-http/src/test/java/org/simpleframework/http/core/ProducerExceptionTest.java
@@ -0,0 +1,23 @@
+package org.simpleframework.http.core;
+
+import java.io.IOException;
+
+import junit.framework.TestCase;
+
+public class ProducerExceptionTest extends TestCase {
+
+ public void testException() {
+ try {
+ throw new IOException("Error");
+ }catch(Exception main) {
+ try {
+ throw new BodyEncoderException("Wrapper", main);
+ }catch(Exception cause) {
+ cause.printStackTrace();
+
+ assertEquals(cause.getCause(), main);
+ }
+ }
+ }
+
+}