// Use simple bind on this connection
Entry userEntry = DirectoryServer.getEntry(
DN.decode("cn=Directory Manager, cn=Root DNs, cn=config"));
ByteString password = ByteString.valueOf("password");
ClientConnection connection2 = new InternalClientConnection(
new AuthenticationInfo(userEntry, userEntry.getDN(), password, true));
ng = NetworkGroup.findMatchingNetworkGroup(connection2);
if (match) {
assertEquals(ng, networkGroup);
} else {
assertEquals(ng, defaultNg);
}
// Use SASL on this connection
ClientConnection connection3 = new InternalClientConnection(
new AuthenticationInfo(userEntry, "external", ByteString.valueOf(
"cn=Directory Manager, cn=Root DNs, cn=config"), true));
ng = NetworkGroup.findMatchingNetworkGroup(connection3);
if (match) {
assertEquals(ng, networkGroup);
} else {