    @Test
    public void testFrom() {

        byte[] foobarBytes = "foobar".getBytes();
        String encoded = new String(encodeBase64(foobarBytes, false), Constants.CHARSET);

        assertEquals("foobar (encoded) should be decoded the same way as in commons-codec",
                     new String(decodeBase64(encoded.getBytes(Constants.CHARSET))),
                     new String(Base64.fromBase64String(encoded)));
    }