    @Test
    public void processSubTypeRuleExistingProperty() {

        TypeSpec.Builder builder = TypeSpec.classBuilder("Test");
        TypeModel model = mock(TypeModel.class);

        Map<String, String> subTypes = new HashMap<>();
        subTypes.put("A", "com.flipkart.lyrics.A");
        subTypes.put("B", "com.flipkart.lyrics.B");
        SubTypeModel subTypeModel = mock(SubTypeModel.class);
        when(subTypeModel.getProperty()).thenReturn("one");
        when(subTypeModel.getSubTypeMapping()).thenReturn(subTypes);
        when(subTypeModel.isExistingProperty()).thenReturn(true);

        when(model.getSubTypes()).thenReturn(subTypeModel);

        new JacksonStyle().processSubTypeRule(builder, model);

        TypeSpec typeSpec = builder.build();
        assertEquals("Test", typeSpec.name);
        assertEquals(2, typeSpec.annotations.size());

        AnnotationSpec typeInfoAnnotation = typeSpec.annotations.get(0);
        assertEquals(3, typeInfoAnnotation.members.size());
    }