public String getClassName(String propertyName, JsonNode node) {

        if (node != null) {
            if (node.has("javaName")) {
                propertyName = node.get("javaName").textValue();
            } else if (generationConfig.isUseTitleAsClassname() && node.has("title")) {
                String title = node.get("title").textValue();
                propertyName = WordUtils.capitalize(title).replaceAll(" ", "");
            }
        }

        return propertyName;
    }
@Test
    public void testClassNameCorrectly() {
        assertThat(nameHelper.getClassName("foo", NODE), is("foo"));
        assertThat(nameHelper.getClassName("foo", node("title", "bar")), is("foo"));
        assertThat(nameHelper.getClassName("foo", node("javaName", "bar")), is("bar"));
        assertThat(nameHelper.getClassName("foo", node("javaName", "bar").put("title", "abc")), is("bar"));

        // TITLE_ATTRIBUTE
        NameHelper nameHelper = helper(true);
        assertThat(nameHelper.getClassName("foo", node("title", "bar")), is("Bar"));
        assertThat(nameHelper.getClassName("foo", node("title", "i am bar")), is("IAmBar"));
        assertThat(nameHelper.getClassName("foo", node("javaName", "bar")), is("bar"));
        assertThat(nameHelper.getClassName("foo", node("javaName", "bar").put("title", "abc")), is("bar"));
    }