TrackerOperationImpl implements TrackerOperation { @Override public void addLogFailed( String logString ) { addLog( logString, OperationState.FAILED ); } TrackerOperationImpl( String source, String description, TrackerImpl tracker ); @Override String getDescription(); @Override UUID getId(); @Override synchronized String getLog(); @Override String getSource(); @Override Date createDate(); @Override OperationState getState(); @Override void addLog( String logString ); @Override void addLogDone( String logString ); @Override void addLogFailed( String logString ); @Override int hashCode(); @Override boolean equals( Object obj );  }
@Test public void shouldCallTracker() { TrackerImpl ti = mock( TrackerImpl.class ); TrackerOperationImpl poi = new TrackerOperationImpl( SOURCE, DESCRIPTION, ti ); poi.addLogFailed( DUMMY_LOG ); verify( ti ).saveTrackerOperation( SOURCE, poi ); }