Polymer { @JsOverlay public static String toCamelCase(String text) { String bactrianCamel = Stream.of(text.split("[^a-zA-Z0-9]")) .map(v -> v.substring(0, 1).toUpperCase() + v.substring(1).toLowerCase()) .collect(Collectors.joining()); return bactrianCamel.toLowerCase().substring(0, 1) + bactrianCamel.substring(1); }  @JsProperty(name = "Base") static native Base Base(); @JsProperty(name = "dom") static native Dom dom(); @JsMethod static native DomApi dom(Base base); @JsMethod static native DomApi dom(Element element); @JsMethod static native DomApi dom(com.google.gwt.dom.client.Element element); @JsOverlay static Promise googleMapsApiPromise(); @JsOverlay static String toCamelCase(String text);  }
@Test public void toCamelCase() throws Exception { assertEquals("thisIsSomeText", Polymer.toCamelCase("THIS_IS_SOME_TEXT")); }