### Question:
OpensocialFunctions { @Functions.Expose(prefix = "osx", names = {"decodeBase64"}) public static String decodeBase64(String text) { if (text == null) { return null; } try { return new String(Base64.decodeBase64(text.getBytes("UTF-8")), "UTF-8"); } catch (UnsupportedEncodingException uee) { throw new RuntimeException(uee); } } private  OpensocialFunctions(); @Functions.Expose(prefix = "osx", names = {"parseJson"}) static Object parseJson(String text); @Functions.Expose(prefix = "osx", names = {"decodeBase64"}) static String decodeBase64(String text); @Functions.Expose(prefix = "osx", names = {"urlEncode"}) static String formEncode(String text); @Functions.Expose(prefix = "osx", names = {"urlDecode"}) static String formDecode(String text);  }### Answer:
@Test public void testDecodeBase64() throws Exception { String test = "12345"; String encoded = new String(Base64.encodeBase64(test.getBytes("UTF-8")), "UTF-8"); vars.put("encoded", encoded); ValueExpression testDecodeBase64 = expressions.parse("${osx:decodeBase64(encoded)}", String.class); assertEquals("12345", testDecodeBase64.getValue(context)); }