Add a unit test for [Issue-14]
diff --git a/src/test/org/codehaus/jackson/map/mixins/TestMixinInheritance.java b/src/test/org/codehaus/jackson/map/mixins/TestMixinInheritance.java
new file mode 100644
index 0000000..206f225
--- /dev/null
+++ b/src/test/org/codehaus/jackson/map/mixins/TestMixinInheritance.java
@@ -0,0 +1,38 @@
+package org.codehaus.jackson.map.mixins;
+
+import java.io.IOException;
+import java.util.Map;
+
+import org.codehaus.jackson.annotate.JsonProperty;
+import org.codehaus.jackson.map.*;
+
+public class TestMixinInheritance
+ extends BaseMapTest
+{
+ // [Issue-14]
+ static class Beano {
+ public int ido = 42;
+ public String nameo = "Bob";
+ }
+
+ static class BeanoMixinSuper {
+ @JsonProperty("name")
+ public String nameo;
+ }
+
+ static class BeanoMixinSub extends BeanoMixinSuper {
+ @JsonProperty("id")
+ public int ido;
+ }
+
+ public void testMixinInheritance() throws IOException
+ {
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.getSerializationConfig().addMixInAnnotations(Beano.class, BeanoMixinSub.class);
+ Map<String,Object> result;
+ result = writeAndMap(mapper, new Beano());
+ assertEquals(2, result.size());
+ assertTrue(result.containsKey("id"));
+ assertTrue(result.containsKey("name"));
+ }
+}