@Test public void test_update_tape_ok() throws TapeCatalogException { when(tapeCatalogRepository.updateTape(anyString(), anyMap())).thenReturn(true); tapeCatalogService.update("", new HashMap<>()); verify(tapeCatalogRepository, times(1)).updateTape(anyString(), anyMap()); }
@Override public boolean update(String tapeId, Map<String, Object> criteria) throws TapeCatalogException { return tapeCatalogRepository.updateTape(tapeId, criteria); }
TapeCatalogServiceImpl implements TapeCatalogService { @Override public boolean update(String tapeId, Map<String, Object> criteria) throws TapeCatalogException { return tapeCatalogRepository.updateTape(tapeId, criteria); } }
TapeCatalogServiceImpl implements TapeCatalogService { @Override public boolean update(String tapeId, Map<String, Object> criteria) throws TapeCatalogException { return tapeCatalogRepository.updateTape(tapeId, criteria); } TapeCatalogServiceImpl(TapeCatalogRepository tapeCatalogRepository); }
TapeCatalogServiceImpl implements TapeCatalogService { @Override public boolean update(String tapeId, Map<String, Object> criteria) throws TapeCatalogException { return tapeCatalogRepository.updateTape(tapeId, criteria); } 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 boolean update(String tapeId, Map<String, Object> criteria) throws TapeCatalogException { return tapeCatalogRepository.updateTape(tapeId, criteria); } 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);  }