public static String makeUnique(String className) {
        
        final Matcher m = UNIQUE_NAMING_PATTERN.matcher(className);
        
        if (m.matches()) {
            // get the current number
            final Integer number = Integer.parseInt(m.group(2));
            // replace the current number in the string with the number +1
            return m.group(1) + (number + 1);
        } else {
            return className + "__1";
        }
    }
@Test
    public void testClassNameStrategy() {
        assertThat(MakeUniqueClassName.makeUnique("NodeMode"), equalTo("NodeMode__1"));
        assertThat(MakeUniqueClassName.makeUnique("NodeMode__5"), equalTo("NodeMode__6"));
        assertThat(MakeUniqueClassName.makeUnique("NodeMode__10"), equalTo("NodeMode__11"));
        assertThat(MakeUniqueClassName.makeUnique("NodeMode__100"), equalTo("NodeMode__101"));
    }