@Test
public void checkValid() {

    BrokerAuthenticator authenticator = new BrokerAuthenticator();
    assertTrue(authenticator.checkValid(null, "root", "root".getBytes()));
    assertFalse(authenticator.checkValid(null, "", "foo".getBytes()));
    assertFalse(authenticator.checkValid(null, "root", null));
    assertFalse(authenticator.checkValid(null, "foo", "foo".getBytes()));
}