TrackerImpl implements Tracker { @Override public TrackerOperationView getTrackerOperation( String source, UUID operationTrackId ) { Preconditions.checkArgument( !StringUtils.isBlank( source ), SOURCE_IS_EMPTY_MSG ); Preconditions.checkNotNull( operationTrackId, "Operation track id is null" ); if ( identityManager.isAdmin() ) { return dataService.getTrackerOperation( source, operationTrackId ); } return dataService.getTrackerUserOperation( source, operationTrackId, identityManager.getActiveUser().getId() ); }  @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 testGetProductOperation() throws Exception { doReturn( true ).when( identityManager ).isAdmin(); tracker.getTrackerOperation( SOURCE, OPERATION_ID ); verify( dataService ).getTrackerOperation( SOURCE, OPERATION_ID ); }