class Base64 {

    public static String encode(byte[] bytes) {
        return encodeBytes(bytes);
    }

}

class TestBase64 {

    protected static final Encoder ENCODER;
    protected static final String USERNAME;
    protected static final String PASSWORD;

    @Test
    public void testEncodeDoesNotBreakLine() {


        String info = USERNAME + ":" + PASSWORD;
        String formerToken = "Basic "
                + org.nuxeo.client.util.Base64.encode(info, org.nuxeo.client.util.Base64.DONT_BREAK_LINES);
        String token = "Basic " + ENCODER.encodeToString(info.getBytes(UTF_8));
        assertEquals(token, formerToken);
    }

}