/** Tests the {@link PlainSaslServer#getAuthorizationID()} to retrieve the correct user. */ @Test public void userPasswordReceiveTest() throws Exception { String testUser = "******"; String password = "******"; mPlainSaslServer.evaluateResponse(getUserInfo(testUser, password)); Assert.assertEquals(testUser, mPlainSaslServer.getAuthorizationID()); }
/** Tests the {@link PlainSaslServer#getAuthorizationID()} method. */ @Test public void authenticationNotCompleteTest() { mThrown.expect(IllegalStateException.class); mThrown.expectMessage("PLAIN authentication not completed"); mPlainSaslServer.getAuthorizationID(); }