### Question:
Base64 { public static String encodeURLSafe(String s) { return base64Url.encode(LessBytes.toBytes(s)); }  static void main(String args[]); static String encode(String s); static String encodeURLSafe(String s); static char[] encode(byte[] in); static char[] encodeURLSafe(byte[] in); static String decode(String s); static String decode(String s, boolean strict); static String decodeURLSafe(String s); static String decodeURLSafe(String s, boolean strict); static byte[] decode(char[] in); static byte[] decode(char[] in, boolean strict); static byte[] decodeURLSafe(char[] in); static byte[] decodeURLSafe(char[] in, boolean strict);  }### Answer:
@Test public void testEncodeString_URLSafeString() { String decoded = " "; String encoded = "IA=="; assertEquals(encoded, Base64.encodeURLSafe(decoded)); }
@Test public void testEncodeURLSafeByteArray() { byte[] decoded = new byte[]{7, 9, 7}; byte[] encoded = new byte[]{66, 119, 107, 72}; assertArrayEquals(encoded, new String(Base64.encodeURLSafe(decoded)).getBytes()); }