### Question:
Base64Utility { public static byte[] decode(String id) throws Base64Exception { return decode(id, false); } private  Base64Utility(); static byte[] decodeChunk(char[] id,
                                     int o,
                                     int l); static byte[] decode(String id); static byte[] decode(String id, boolean urlSafe); static void decode(char[] id,
                             int o,
                             int l,
                             OutputStream ostream); static void decode(String id,
                              OutputStream ostream); static String encode(byte[] id); static String encode(byte[] id, boolean urlSafe); static char[] encodeChunk(byte[] id,
                                     int o,
                                     int l); static char[] encodeChunk(byte[] id,
                                     int o,
                                     int l,
                                     boolean urlSafe); static void encodeAndStream(byte[] id,
                                       int o,
                                       int l,
                                       OutputStream os); static void encodeAndStream(byte[] id,
                                           int o,
                                           int l,
                                           boolean urlSafe,
                                           OutputStream os); static void encodeChunk(byte[] id,
                                   int o,
                                   int l,
                                   OutputStream ostream); static void encode(byte[] id,
                              int o,
                              int l,
                              Writer writer); static boolean isValidBase64(int ch);  }### Answer:
@Test(expected = Base64Exception.class) public void testDecodeInvalidString() throws Exception { String in = "QWxhZGRpbjpcGVuIHNlc2FtZQ=="; Base64Utility.decode(in); }