### Question:
PlanImpl implements Plan { @Override public synchronized void deactivate() { getStepsMap().values().forEach(Step::deactivate); this.setActive(false); } protected  PlanImpl(); @Override Step[] getSteps(); @Override Step[] getExecutableSteps(); @Override String getDocIdField(); @Override Step findStep(String stepName); @Override BufferedImage visualize(); @Override synchronized void activate(); @Override synchronized void deactivate(); @Transient @Override synchronized boolean isActive(); @Override void advertise(); @Override void stopAdvertising(); @Override void acceptJiniRequests(); @Override void denyJiniRequests(); @Override boolean readyForJiniRequests(); @Override String getName();  }### Answer:
@Test public void testDeactivate() { LinkedHashMap<String, Step> stringStepLinkedHashMap = new LinkedHashMap<>(); stringStepLinkedHashMap.put("foo", stepMock); expect(plan.getStepsMap()).andReturn(stringStepLinkedHashMap); stepMock.deactivate(); plan.setActive(false); replay(); plan.deactivate(); }