JDefinedClass jclass = new JCodeModel()._class(TARGET_CLASS_NAME);
TypeRule mockTypeRule = mock(TypeRule.class);
when(mockRuleFactory.getTypeRule()).thenReturn(mockTypeRule);
when(mockRuleFactory.getSchemaStore()).thenReturn(new SchemaStore());
ArgumentCaptor<JsonNode> captureJsonNode = ArgumentCaptor.forClass(JsonNode.class);
ArgumentCaptor<Schema> captureSchema = ArgumentCaptor.forClass(Schema.class);
rule.apply(NODE_NAME, schemaWithRef, jclass, null);