HarvestAgentMemoryChecker extends MemoryChecker { protected void onRemoveWarning() { super.onRemoveWarning(); harvestAgent.setMemoryWarning(false); } HarvestAgentMemoryChecker(); HarvestAgent getHarvestAgent(); void setHarvestAgent(HarvestAgent harvestAgent);  }
@Test public final void testOnRemoveWarning() { try { HarvestAgent ha = new MockHarvestAgent(); ha.setMemoryWarning(true); testInstance.setHarvestAgent(ha); testInstance.onRemoveWarning(); assertFalse(testInstance.getHarvestAgent().getMemoryWarning()); } catch(Exception e) { fail(e.getMessage()); } }