// Create a network group and store it in the client connection.
// As the network group is empty, all searches should fail with a
// no such object result code.
String networkGroupID = "useNetworkGroupID";
NetworkGroup networkGroup = new NetworkGroup(networkGroupID);
ClientConnection clientConnection = searchOperation.getClientConnection();
clientConnection.setNetworkGroup(networkGroup);
searchOperation.run();
assertEquals(searchOperation.getResultCode(), ResultCode.NO_SUCH_OBJECT);
// Now register the o=test workflow and search again. The search
// should succeed.
networkGroup.registerWorkflow(workflowImpl);
searchOperation.run();
assertEquals(searchOperation.getResultCode(), ResultCode.SUCCESS);
// Put back the internal network group in the client connection
// and check that searches are still working.