public static String getJavaClassName(final Schema schema) {
    String namespace = schema.getNamespace();
    if (namespace == null) {
      return SpecificData.mangle(schema.getName());
    } else {
      return namespace + '.' + SpecificData.mangle(schema.getName());
    }
  }
@Test
  void getJavaClassName() {
    assertEquals("N",
        Schemas.getJavaClassName(new Schema.Parser().parse("{\"type\": \"fixed\", \"name\": \"N\", \"size\": 10}")));
    assertEquals("N", Schemas.getJavaClassName(
        new Schema.Parser().parse("{\"type\": \"fixed\", \"name\": \"N\", \"size\": 10, \"namespace\": \"\"}")));
    assertEquals("com.example.N", Schemas.getJavaClassName(new Schema.Parser()
        .parse("{\"type\": \"fixed\", \"name\": \"N\", \"size\": 10, \"namespace\": \"com.example\"}")));
  }