@@ -0,0 +1,1772 @@
+package de.undercouch.bson4jackson;%0A%0Aimport static org.junit.Assert.assertEquals;%0A%0Aimport java.util.UUID;%0A%0Aimport org.junit.Test;%0A%0Aimport com.fasterxml.jackson.annotation.JsonSubTypes;%0Aimport com.fasterxml.jackson.annotation.JsonTypeInfo;%0Aimport com.fasterxml.jackson.databind.ObjectMapper;%0A%0Apublic class Issue67Test %7B%0A%09@JsonTypeInfo(%0A%09%09use = JsonTypeInfo.Id.NAME,%0A%09%09include = JsonTypeInfo.As.EXISTING_PROPERTY,%0A%09%09property = %22type%22%0A%09)%0A%09@JsonSubTypes(%7B%0A%09%09@JsonSubTypes.Type(name = %22a%22, value = TypeAsPropertyWithUUIDA.class),%0A%09%09@JsonSubTypes.Type(name = %22b%22, value = TypeAsPropertyWithUUIDA.class)%0A%09%7D)%0A%09public static abstract class TypeAsPropertyWithUUIDBase %7B%0A%09%09String type;%0A%09%09UUID uuid;%0A%09%09%0A%09%09public void setType(String type) %7B%0A%09%09%09this.type = type;%0A%09%09%7D%0A%09%09%0A%09%09public String getType() %7B%0A%09%09%09return type;%0A%09%09%7D%0A%09%09%0A%09%09public void setUUID(UUID uuid) %7B%0A%09%09%09this.uuid = uuid;%0A%09%09%7D%0A%09%09%0A%09%09public UUID getUUID() %7B%0A%09%09%09return uuid;%0A%09%09%7D%0A%09%7D%0A%09%0A%09public static class TypeAsPropertyWithUUIDA extends TypeAsPropertyWithUUIDBase %7B%0A%09%09TypeAsPropertyWithUUIDA() %7B%0A%09%09%09type = %22a%22;%0A%09%09%09uuid = UUID.randomUUID();%0A%09%09%7D%0A%09%7D%0A%09%0A%09public static class TypeAsPropertyWithUUIDB extends TypeAsPropertyWithUUIDBase %7B%0A%09%09TypeAsPropertyWithUUIDB() %7B%0A%09%09%09type = %22b%22;%0A%09%09%09uuid = UUID.randomUUID();%0A%09%09%7D%0A%09%7D%0A%09%0A%09@Test%0A%09public void parseTypeAsExistingPropertyWithUUID() throws Exception %7B%0A%09%09ObjectMapper mapper = new ObjectMapper(new BsonFactory())%0A%09%09%09%09.registerModule(new BsonModule());%0A%09%09TypeAsPropertyWithUUIDA a = new TypeAsPropertyWithUUIDA();%0A%09%09byte%5B%5D bytes = mapper.writeValueAsBytes(a);%0A%09%09TypeAsPropertyWithUUIDBase v = mapper.readValue(bytes,%0A%09%09%09%09TypeAsPropertyWithUUIDBase.class);%0A%09%09assertEquals(%22a%22, v.getType());%0A%09%09assertEquals(TypeAsPropertyWithUUIDA.class, v.getClass());%0A%09%09assertEquals(a.getUUID(), v.getUUID());%0A%09%7D%0A%7D%0A

Add test for issue #67