@Test public void test_find_by_id_tape_ok() throws TapeCatalogException { when(tapeCatalogRepository.findTapeById(anyString())).thenReturn(mock(TapeCatalog.class)); tapeCatalogService.findById("fakeId"); verify(tapeCatalogRepository, times(1)).findTapeById(anyString()); }
@Override public TapeCatalog findById(String tapeId) throws TapeCatalogException { return tapeCatalogRepository.findTapeById(tapeId); }
TapeCatalogServiceImpl implements TapeCatalogService { @Override public TapeCatalog findById(String tapeId) throws TapeCatalogException { return tapeCatalogRepository.findTapeById(tapeId); } }
TapeCatalogServiceImpl implements TapeCatalogService { @Override public TapeCatalog findById(String tapeId) throws TapeCatalogException { return tapeCatalogRepository.findTapeById(tapeId); } TapeCatalogServiceImpl(TapeCatalogRepository tapeCatalogRepository); }
TapeCatalogServiceImpl implements TapeCatalogService { @Override public TapeCatalog findById(String tapeId) throws TapeCatalogException { return tapeCatalogRepository.findTapeById(tapeId); } TapeCatalogServiceImpl(TapeCatalogRepository tapeCatalogRepository); @Override void create(TapeCatalog tapeCatalog); @Override boolean replace(TapeCatalog tapeCatalog); @Override boolean update(String tapeId, Map<String, Object> criteria); @Override Map<Integer, TapeCatalog> init(String tapeLibraryIdentifier, TapeLibrarySpec libraryState); @Override TapeCatalog findById(String tapeId); @Override List<TapeCatalog> find(List<QueryCriteria> criteria); @Override void add(QueueMessageEntity queue); @Override void addIfAbsent(List<QueryCriteria> criteria, QueueMessageEntity queueMessageEntity); @Override long remove(String queueId); @Override long complete(String queueId); @Override long markError(String queueMessageId); @Override long markReady(String queueId); @Override long initializeOnBootstrap(); @Override Optional<T> receive(QueueMessageType messageType); @Override Optional<T> receive(QueueMessageType messageType, boolean usePriority); @Override Optional<T> receive(Bson inQuery, QueueMessageType messageType); @Override Optional<T> receive(Bson inQuery, QueueMessageType messageType, boolean usePriority); @Override Optional<T> receive(Bson inQuery, Bson inUpdate, QueueMessageType messageType); @Override Optional<T> receive(Bson inQuery, Bson inUpdate, QueueMessageType messageType, boolean usePriority); }
TapeCatalogServiceImpl implements TapeCatalogService { @Override public TapeCatalog findById(String tapeId) throws TapeCatalogException { return tapeCatalogRepository.findTapeById(tapeId); } TapeCatalogServiceImpl(TapeCatalogRepository tapeCatalogRepository); @Override void create(TapeCatalog tapeCatalog); @Override boolean replace(TapeCatalog tapeCatalog); @Override boolean update(String tapeId, Map<String, Object> criteria); @Override Map<Integer, TapeCatalog> init(String tapeLibraryIdentifier, TapeLibrarySpec libraryState); @Override TapeCatalog findById(String tapeId); @Override List<TapeCatalog> find(List<QueryCriteria> criteria); @Override void add(QueueMessageEntity queue); @Override void addIfAbsent(List<QueryCriteria> criteria, QueueMessageEntity queueMessageEntity); @Override long remove(String queueId); @Override long complete(String queueId); @Override long markError(String queueMessageId); @Override long markReady(String queueId); @Override long initializeOnBootstrap(); @Override Optional<T> receive(QueueMessageType messageType); @Override Optional<T> receive(QueueMessageType messageType, boolean usePriority); @Override Optional<T> receive(Bson inQuery, QueueMessageType messageType); @Override Optional<T> receive(Bson inQuery, QueueMessageType messageType, boolean usePriority); @Override Optional<T> receive(Bson inQuery, Bson inUpdate, QueueMessageType messageType); @Override Optional<T> receive(Bson inQuery, Bson inUpdate, QueueMessageType messageType, boolean usePriority);  }