@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 applyDefaultsToBaseType() {
        TextNode formatNode = TextNode.valueOf("unknown-format");

        JType baseType = new JCodeModel().ref(Long.class);

        JType result = rule.apply("fooBar", formatNode, null, baseType, null);

        assertThat(result, equalTo(baseType));
    }