/* Create Mock P2jPlanGenerator objects with methods stubbed out to
let the BasicP2LClient.createPlan() method complete, and
pass them to the client via the setter method. */
public void setMockPlanGenerators(BasicP2LClient client) {
P2jPlan pln = mock(P2jPlan.class);
P2jPlanGenerator unopt_plan = mock(P2jPlanGenerator.class);
when(unopt_plan.getP2jPlan()).thenReturn(pln);
P2jPlanGenerator opt_plan = mock(P2jPlanGenerator.class);
when(opt_plan.getP2jPlan()).thenReturn(pln);
client.setPlanGenerators(unopt_plan, opt_plan);
}