@Override
    public JType apply(String nodeName, JsonNode node, JsonNode parent, JType baseType, Schema schema) {

        Class<?> type = getType(node.asText());
        if (type != null) {
            JType jtype = baseType.owner()._ref(type);
            if (ruleFactory.getGenerationConfig().isUsePrimitives()) {
                jtype = jtype.unboxify();
            }
            return jtype;
        } else {
            return baseType;
        }
    }
@Test
    public void applyGeneratesTypeFromFormatValue() {
        TextNode formatNode = TextNode.valueOf(formatValue);

        JType result = rule.apply("fooBar", formatNode, null, new JCodeModel().ref(String.class), null);

        assertThat(result.fullName(), equalTo(expectedType.getName()));
    }