@Test public void testGetUnitLifeCycleStatus() throws LogbookClientNotFoundException, LogbookClientServerException, LogbookClientBadRequestException { LogbookLifeCyclesClientFactory.changeMode(null); final LogbookLifeCyclesClient client = LogbookLifeCyclesClientFactory.getInstance().getClient(); assertNotNull(client); String unitId = GUIDFactory.newUnitGUID(0).toString(); LifeCycleStatusCode unitLifeCycleStatus = client.getUnitLifeCycleStatus(unitId); assertNull(unitLifeCycleStatus); String operationId = GUIDFactory.newOperationLogbookGUID(0).toString(); client.commitUnit(operationId, unitId); unitLifeCycleStatus = client.getUnitLifeCycleStatus(unitId); assertNotNull(unitLifeCycleStatus); assertEquals(unitLifeCycleStatus, LifeCycleStatusCode.LIFE_CYCLE_COMMITTED); }
@Override public LifeCycleStatusCode getUnitLifeCycleStatus(String unitId) { return getObjectLifeCycleStatus(unitId); }
LogbookLifeCyclesClientMock extends AbstractMockClient implements LogbookLifeCyclesClient { @Override public LifeCycleStatusCode getUnitLifeCycleStatus(String unitId) { return getObjectLifeCycleStatus(unitId); } }
LogbookLifeCyclesClientMock extends AbstractMockClient implements LogbookLifeCyclesClient { @Override public LifeCycleStatusCode getUnitLifeCycleStatus(String unitId) { return getObjectLifeCycleStatus(unitId); }  }
LogbookLifeCyclesClientMock extends AbstractMockClient implements LogbookLifeCyclesClient { @Override public LifeCycleStatusCode getUnitLifeCycleStatus(String unitId) { return getObjectLifeCycleStatus(unitId); }  @Override void create(LogbookLifeCycleParameters parameters); @Override void update(LogbookLifeCycleParameters parameters); @Override void update(LogbookLifeCycleParameters parameters, LifeCycleStatusCode lifeCycleStatusCode); @Deprecated @Override void commit(LogbookLifeCycleParameters parameters); @Override void rollback(LogbookLifeCycleParameters parameters); @Override JsonNode selectUnitLifeCycleById(String id, JsonNode queryDsl); @Override JsonNode selectUnitLifeCycleById(String id, JsonNode queryDsl, LifeCycleStatusCode lifeCycleStatus); @Override JsonNode selectUnitLifeCycle(JsonNode queryDsl); @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 List<JsonNode> getRawUnitLifecyclesByLastPersistedDate(LocalDateTime startDate, LocalDateTime endDate, int limit); @Override List<JsonNode> getRawObjectGroupLifecyclesByLastPersistedDate(LocalDateTime startDate,
        LocalDateTime endDate,
        int limit); @Override JsonNode selectObjectGroupLifeCycleById(String id, JsonNode queryDsl); @Override JsonNode selectObjectGroupLifeCycleById(String id, JsonNode queryDsl, LifeCycleStatusCode lifeCycleStatus); @SuppressWarnings({"unchecked", "rawtypes"}) @Override RequestResponse objectGroupLifeCyclesByOperationIterator(String operationId,
        LifeCycleStatusCode lifeCycleStatus, JsonNode query); @SuppressWarnings({"unchecked", "rawtypes"}) @Override RequestResponse unitLifeCyclesByOperationIterator(String operationId,
        LifeCycleStatusCode lifeCycleStatus, JsonNode query); @Override void bulkCreateUnit(String eventIdProc, Iterable<LogbookLifeCycleParameters> queue); @Override void bulkUpdateUnit(String eventIdProc, Iterable<LogbookLifeCycleParameters> queue); @Override void bulkCreateObjectGroup(String eventIdProc, Iterable<LogbookLifeCycleParameters> queue); @Override void bulkUpdateObjectGroup(String eventIdProc, Iterable<LogbookLifeCycleParameters> queue); @Override void commitUnit(String operationId, String unitId); @Override void commitObjectGroup(String operationId, String objectGroupId); @Override void rollBackUnitsByOperation(String operationId); @Override void rollBackObjectGroupsByOperation(String operationId); @Override LifeCycleStatusCode getUnitLifeCycleStatus(String unitId); @Override LifeCycleStatusCode getObjectGroupLifeCycleStatus(String objectGroupId); @Override JsonNode selectObjectGroupLifeCycle(JsonNode queryDsl); @Override void bulkObjectGroup(String eventIdProc, List<LogbookLifeCycleObjectGroupModel> logbookLifeCycleModels); @Override void bulkUnit(String eventIdProc, List<LogbookLifeCycleUnitModel> logbookLifeCycleModels); @Override void createRawbulkObjectgrouplifecycles(List<JsonNode> logbookLifeCycleRaws); @Override void createRawbulkUnitlifecycles(List<JsonNode> logbookLifeCycleRaws); @Override void deleteLifecycleUnitsBulk(Collection<String> listIds); @Override void deleteLifecycleObjectGroupBulk(Collection<String> listIds); @Override void bulkLifeCycleTemporary(String operationId, DistributionType type, List<LogbookLifeCycleParametersBulk> logbookLifeCycleParametersBulk); @Override void bulkLifeCycle(String operationId, DistributionType type, List<LogbookLifeCycleParametersBulk> logbookLifeCycleParametersBulk); }
LogbookLifeCyclesClientMock extends AbstractMockClient implements LogbookLifeCyclesClient { @Override public LifeCycleStatusCode getUnitLifeCycleStatus(String unitId) { return getObjectLifeCycleStatus(unitId); }  @Override void create(LogbookLifeCycleParameters parameters); @Override void update(LogbookLifeCycleParameters parameters); @Override void update(LogbookLifeCycleParameters parameters, LifeCycleStatusCode lifeCycleStatusCode); @Deprecated @Override void commit(LogbookLifeCycleParameters parameters); @Override void rollback(LogbookLifeCycleParameters parameters); @Override JsonNode selectUnitLifeCycleById(String id, JsonNode queryDsl); @Override JsonNode selectUnitLifeCycleById(String id, JsonNode queryDsl, LifeCycleStatusCode lifeCycleStatus); @Override JsonNode selectUnitLifeCycle(JsonNode queryDsl); @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 List<JsonNode> getRawUnitLifecyclesByLastPersistedDate(LocalDateTime startDate, LocalDateTime endDate, int limit); @Override List<JsonNode> getRawObjectGroupLifecyclesByLastPersistedDate(LocalDateTime startDate,
        LocalDateTime endDate,
        int limit); @Override JsonNode selectObjectGroupLifeCycleById(String id, JsonNode queryDsl); @Override JsonNode selectObjectGroupLifeCycleById(String id, JsonNode queryDsl, LifeCycleStatusCode lifeCycleStatus); @SuppressWarnings({"unchecked", "rawtypes"}) @Override RequestResponse objectGroupLifeCyclesByOperationIterator(String operationId,
        LifeCycleStatusCode lifeCycleStatus, JsonNode query); @SuppressWarnings({"unchecked", "rawtypes"}) @Override RequestResponse unitLifeCyclesByOperationIterator(String operationId,
        LifeCycleStatusCode lifeCycleStatus, JsonNode query); @Override void bulkCreateUnit(String eventIdProc, Iterable<LogbookLifeCycleParameters> queue); @Override void bulkUpdateUnit(String eventIdProc, Iterable<LogbookLifeCycleParameters> queue); @Override void bulkCreateObjectGroup(String eventIdProc, Iterable<LogbookLifeCycleParameters> queue); @Override void bulkUpdateObjectGroup(String eventIdProc, Iterable<LogbookLifeCycleParameters> queue); @Override void commitUnit(String operationId, String unitId); @Override void commitObjectGroup(String operationId, String objectGroupId); @Override void rollBackUnitsByOperation(String operationId); @Override void rollBackObjectGroupsByOperation(String operationId); @Override LifeCycleStatusCode getUnitLifeCycleStatus(String unitId); @Override LifeCycleStatusCode getObjectGroupLifeCycleStatus(String objectGroupId); @Override JsonNode selectObjectGroupLifeCycle(JsonNode queryDsl); @Override void bulkObjectGroup(String eventIdProc, List<LogbookLifeCycleObjectGroupModel> logbookLifeCycleModels); @Override void bulkUnit(String eventIdProc, List<LogbookLifeCycleUnitModel> logbookLifeCycleModels); @Override void createRawbulkObjectgrouplifecycles(List<JsonNode> logbookLifeCycleRaws); @Override void createRawbulkUnitlifecycles(List<JsonNode> logbookLifeCycleRaws); @Override void deleteLifecycleUnitsBulk(Collection<String> listIds); @Override void deleteLifecycleObjectGroupBulk(Collection<String> listIds); @Override void bulkLifeCycleTemporary(String operationId, DistributionType type, List<LogbookLifeCycleParametersBulk> logbookLifeCycleParametersBulk); @Override void bulkLifeCycle(String operationId, DistributionType type, List<LogbookLifeCycleParametersBulk> logbookLifeCycleParametersBulk);  }