@Test(expected = LogbookNotFoundException.class) public void givenUpdateAndCommitOGLCWhenOGLCNotExistsThenThrowLogbookException() throws Exception { Mockito.doThrow(LogbookNotFoundException.class).when(mongoDbAccess) .updateLogbookLifeCycleObjectGroup(any(), any(), any(), eq(true)); logbookLifeCyclesImpl = new LogbookLifeCyclesImpl(mongoDbAccess); logbookLifeCyclesImpl.updateObjectGroup(iop.toString(), ioL.toString(), logbookLCOGParameters, true); }
@Override public void updateObjectGroup(String idOperation, String idLc, LogbookLifeCycleObjectGroupParameters parameters) throws LogbookNotFoundException, LogbookDatabaseException, IllegalArgumentException, LogbookAlreadyExistsException { checkLifeCyclesObjectGroupArgument(idOperation, idLc, parameters); mongoDbAccess.updateLogbookLifeCycleObjectGroup(idOperation, idLc, parameters); }
LogbookLifeCyclesImpl implements LogbookLifeCycles { @Override public void updateObjectGroup(String idOperation, String idLc, LogbookLifeCycleObjectGroupParameters parameters) throws LogbookNotFoundException, LogbookDatabaseException, IllegalArgumentException, LogbookAlreadyExistsException { checkLifeCyclesObjectGroupArgument(idOperation, idLc, parameters); mongoDbAccess.updateLogbookLifeCycleObjectGroup(idOperation, idLc, parameters); } }
LogbookLifeCyclesImpl implements LogbookLifeCycles { @Override public void updateObjectGroup(String idOperation, String idLc, LogbookLifeCycleObjectGroupParameters parameters) throws LogbookNotFoundException, LogbookDatabaseException, IllegalArgumentException, LogbookAlreadyExistsException { checkLifeCyclesObjectGroupArgument(idOperation, idLc, parameters); mongoDbAccess.updateLogbookLifeCycleObjectGroup(idOperation, idLc, parameters); } LogbookLifeCyclesImpl(LogbookDbAccess mongoDbAccess); }
LogbookLifeCyclesImpl implements LogbookLifeCycles { @Override public void updateObjectGroup(String idOperation, String idLc, LogbookLifeCycleObjectGroupParameters parameters) throws LogbookNotFoundException, LogbookDatabaseException, IllegalArgumentException, LogbookAlreadyExistsException { checkLifeCyclesObjectGroupArgument(idOperation, idLc, parameters); mongoDbAccess.updateLogbookLifeCycleObjectGroup(idOperation, idLc, parameters); } LogbookLifeCyclesImpl(LogbookDbAccess mongoDbAccess); @Override void createUnit(String idOperation, String idLc, LogbookLifeCycleUnitParameters parameters); @Override void createObjectGroup(String idOperation, String idLc, LogbookLifeCycleObjectGroupParameters parameters); @Override void updateUnit(String idOperation, String idLc, LogbookLifeCycleUnitParameters parameters); @Override void updateUnit(String idOperation, String idLc, LogbookLifeCycleUnitParameters parameters, boolean commit); @Override void updateObjectGroup(String idOperation, String idLc, LogbookLifeCycleObjectGroupParameters parameters); @Override void updateObjectGroup(String idOperation, String idLc, LogbookLifeCycleObjectGroupParameters parameters,
        boolean commit); @Override LogbookLifeCycle selectLifeCycleById(String lifecycleId, JsonNode queryDsl, boolean sliced, LogbookCollections collection); @Override List<LogbookLifeCycle> selectLifeCycles(JsonNode select, boolean sliced, LogbookCollections collection); @Override void rollbackUnit(String idOperation, String idLc); @Override void rollbackObjectGroup(String idOperation, String idLc); @Override void createBulkLogbookLifecycle(String idOp, LogbookLifeCycleParameters[] lifecycleArray); @Override void updateBulkLogbookLifecycle(String idOp, LogbookLifeCycleParameters[] lifecycleArray); @Override void commitUnit(String idOperation, String idLc); @Override void commitObjectGroup(String idOperation, String idLc); @Override void rollBackUnitsByOperation(String idOperation); @Override void rollBackObjectGroupsByOperation(String idOperation); @Override LifeCycleStatusCode getUnitLifeCycleStatus(String unitId); @Override LifeCycleStatusCode getObjectGroupLifeCycleStatus(String objectGroupId); @Override void bulk(LogbookCollections collections, String idOp,
        List<? extends LogbookLifeCycleModel> logbookLifeCycleModels); @Override List<JsonNode> getRawUnitLifecyclesByLastPersistedDate(String startDate, String endDate, int limit); @Override List<JsonNode> getRawObjectGroupLifecyclesByLastPersistedDate(String startDate, String endDate,
        int limit); @Override JsonNode getRawUnitLifeCycleById(String id); @Override List<JsonNode> getRawUnitLifeCycleByIds(List<String> ids); @Override JsonNode getRawObjectGroupLifeCycleById(String id); @Override List<JsonNode> getRawObjectGroupLifeCycleByIds(List<String> ids); @Override void updateLogbookLifeCycleBulk(LogbookCollections logbookCollections, List<LogbookLifeCycleParametersBulk> logbookLifeCycleParametersBulk); @Override void deleteLifeCycleObjectGroups(List<String> objectGroupIds); @Override void deleteLifeCycleUnits(List<String> unitsIdentifier); }
LogbookLifeCyclesImpl implements LogbookLifeCycles { @Override public void updateObjectGroup(String idOperation, String idLc, LogbookLifeCycleObjectGroupParameters parameters) throws LogbookNotFoundException, LogbookDatabaseException, IllegalArgumentException, LogbookAlreadyExistsException { checkLifeCyclesObjectGroupArgument(idOperation, idLc, parameters); mongoDbAccess.updateLogbookLifeCycleObjectGroup(idOperation, idLc, parameters); } LogbookLifeCyclesImpl(LogbookDbAccess mongoDbAccess); @Override void createUnit(String idOperation, String idLc, LogbookLifeCycleUnitParameters parameters); @Override void createObjectGroup(String idOperation, String idLc, LogbookLifeCycleObjectGroupParameters parameters); @Override void updateUnit(String idOperation, String idLc, LogbookLifeCycleUnitParameters parameters); @Override void updateUnit(String idOperation, String idLc, LogbookLifeCycleUnitParameters parameters, boolean commit); @Override void updateObjectGroup(String idOperation, String idLc, LogbookLifeCycleObjectGroupParameters parameters); @Override void updateObjectGroup(String idOperation, String idLc, LogbookLifeCycleObjectGroupParameters parameters,
        boolean commit); @Override LogbookLifeCycle selectLifeCycleById(String lifecycleId, JsonNode queryDsl, boolean sliced, LogbookCollections collection); @Override List<LogbookLifeCycle> selectLifeCycles(JsonNode select, boolean sliced, LogbookCollections collection); @Override void rollbackUnit(String idOperation, String idLc); @Override void rollbackObjectGroup(String idOperation, String idLc); @Override void createBulkLogbookLifecycle(String idOp, LogbookLifeCycleParameters[] lifecycleArray); @Override void updateBulkLogbookLifecycle(String idOp, LogbookLifeCycleParameters[] lifecycleArray); @Override void commitUnit(String idOperation, String idLc); @Override void commitObjectGroup(String idOperation, String idLc); @Override void rollBackUnitsByOperation(String idOperation); @Override void rollBackObjectGroupsByOperation(String idOperation); @Override LifeCycleStatusCode getUnitLifeCycleStatus(String unitId); @Override LifeCycleStatusCode getObjectGroupLifeCycleStatus(String objectGroupId); @Override void bulk(LogbookCollections collections, String idOp,
        List<? extends LogbookLifeCycleModel> logbookLifeCycleModels); @Override List<JsonNode> getRawUnitLifecyclesByLastPersistedDate(String startDate, String endDate, int limit); @Override List<JsonNode> getRawObjectGroupLifecyclesByLastPersistedDate(String startDate, String endDate,
        int limit); @Override JsonNode getRawUnitLifeCycleById(String id); @Override List<JsonNode> getRawUnitLifeCycleByIds(List<String> ids); @Override JsonNode getRawObjectGroupLifeCycleById(String id); @Override List<JsonNode> getRawObjectGroupLifeCycleByIds(List<String> ids); @Override void updateLogbookLifeCycleBulk(LogbookCollections logbookCollections, List<LogbookLifeCycleParametersBulk> logbookLifeCycleParametersBulk); @Override void deleteLifeCycleObjectGroups(List<String> objectGroupIds); @Override void deleteLifeCycleUnits(List<String> unitsIdentifier);  }