Enums { public static String getEnumNameFromFriendly(String anEnumFriendlyName) { return _Strings.splitThenStream(anEnumFriendlyName, " ") .map(_Strings::upper) .collect(Collectors.joining("_")); }  static String getFriendlyNameOf(Enum<?> anEnum); static String getFriendlyNameOf(String anEnumName); static String getEnumNameFromFriendly(String anEnumFriendlyName); static String enumToHttpHeader(final Enum<?> anEnum); static String enumNameToHttpHeader(final String name); static String enumToCamelCase(final Enum<?> anEnum);  }
@Test public void getEnumNameFromFriendly() { assertThat(Enums.getEnumNameFromFriendly("Anywhere"), is("ANYWHERE")); assertThat(Enums.getEnumNameFromFriendly("All Tables"), is("ALL_TABLES")); }