Assert.assertEquals(DatatypeConverter.printBase64Binary(scramSaslClient.hi("test".getBytes(), "salt".getBytes(), 4096)), "suIjHg0e14CDoom6wmHKz3naWOc=");
}
@Test
public void testSasl() throws SaslException {
XmppSession xmppSession = new TestXmppSession();
String[] preferredMechanisms = xmppSession.getAuthenticationManager().getPreferredMechanisms().toArray(new String[xmppSession.getAuthenticationManager().getPreferredMechanisms().size()]);
SaslClient sc = Sasl.createSaslClient(preferredMechanisms, "authorizationId", "xmpp", "localhost", null, new CallbackHandler() {
@Override
public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
for (Callback callback : callbacks) {
if (callback instanceof NameCallback) {