TrackerImpl implements Tracker { @Override public TrackerOperation createTrackerOperation( String source, String description ) { Preconditions.checkArgument( !StringUtils.isBlank( source ), SOURCE_IS_EMPTY_MSG ); Preconditions.checkNotNull( !StringUtils.isBlank( description ), "Description is null or empty" ); TrackerOperationImpl po = new TrackerOperationImpl( source.toUpperCase(), description, this ); if ( saveTrackerOperation( source, po ) ) { return po; } throw new IllegalStateException( "Failed to create tracker object" ); }  @Override TrackerOperationView getTrackerOperation( String source, UUID operationTrackId ); @Override TrackerOperation createTrackerOperation( String source, String description ); @Override List<TrackerOperationView> getTrackerOperations( String source, Date fromDate, Date toDate, int limit ); @Override List<String> getTrackerOperationSources(); @Override void printOperationLog( String source, UUID operationTrackId, long maxOperationDurationMs ); @Override void setOperationViewState( String source, UUID operationId, boolean display ); @Override void setOperationsViewStates( boolean display ); @Override List<TrackerOperationView> getNotifications(); void init(); void dispose(); void setDaoManager( final DaoManager daoManager ); void setIdentityManager( final IdentityManager identityManager );  }
@Test public void testCreateTrackerOperation() throws Exception { tracker.createTrackerOperation( SOURCE, DESCRIPTION ); verify( dataService ).saveTrackerOperation( eq( SOURCE ), isA( TrackerOperationImpl.class ), eq( 1L ) ); }