enumNode.put("type", "string");
schemaContent.put("enum", enumNode);
JDefinedClass jclass = new JCodeModel()._class(TARGET_CLASS_NAME);
Schema schema = mock(Schema.class);
when(schema.getContent()).thenReturn(schemaContent);
schema.setJavaTypeIfEmpty(jclass);
EnumRule enumRule = mock(EnumRule.class);
when(mockRuleFactory.getEnumRule()).thenReturn(enumRule);
when(enumRule.apply(NODE_NAME, enumNode, jclass, schema)).thenReturn(jclass);