EncodingUtils { public static BaseEncoding get(String identifier) { switch (identifier) { case "base64": return BaseEncoding.base64(); case "base32": return BaseEncoding.base32(); case "base16": return BaseEncoding.base16(); default: return null; } }  static BaseEncoding get(String identifier);  }
@Test public void simple() { Assert.assertNotNull(EncodingUtils.get("base16")); Assert.assertNotNull(EncodingUtils.get("base32")); Assert.assertNotNull(EncodingUtils.get("base64")); Assert.assertNull(EncodingUtils.get("BASE64")); }