@PublicAPI(usage = ACCESS)
    public static String ensureSimpleName(String name) {
        // Excluding the '$' character might be incorrect, but since '$' is a valid character of a class name
        // and also the delimiter within the fully qualified name between an inner class and its enclosing class,
        // there is no clean way to derive the simple name from just a fully qualified class name without
        // further information
        // Luckily for imported classes we can read this information from the bytecode

        int lastIndexOfDot = name.lastIndexOf('.');
        String partAfterDot = lastIndexOfDot >= 0 ? name.substring(lastIndexOfDot + 1) : name;

        int lastIndexOf$ = partAfterDot.lastIndexOf('$');
        String simpleNameCandidate = lastIndexOf$ >= 0 ? partAfterDot.substring(lastIndexOf$ + 1) : partAfterDot;

        for (int i = 0; i < simpleNameCandidate.length(); i++) {
            if (Character.isJavaIdentifierStart(simpleNameCandidate.charAt(i))) {
                return simpleNameCandidate.substring(i);
            }
        }
        return "";
    }
@Test
    @UseDataProvider("simple_name_test_cases")
    public void ensureSimpleName(String input, String expected) {
        assertThat(Formatters.ensureSimpleName(input)).isEqualTo(expected);
    }