private String constructInitialClientResponse() throws IOException {
        final ByteArrayOutputStream out = new ByteArrayOutputStream(512);
        out.write(0);
        out.write(user.getBytes(StandardCharsets.UTF_8));
        out.write(0);
        out.write(password.getBytes(StandardCharsets.UTF_8));
        return Base64.getEncoder().encodeToString(out.toByteArray());
    }
Creates the base64 encoded SASL PLAIN initial response.
src/test/java/de/gessnerfl/fakesmtp/smtp/client/PlainAuthenticator.java