@Test void revert_ok() { when(userMgmtStaffRestClient.getBranchUserLogins()) .thenReturn(ResponseEntity.ok(Arrays.asList(LOGIN))); when(dataRestClient.getPoint(anyLong())).thenReturn(ResponseEntity.ok(getPoint())); RevertRequestTO revertRequestTO = getRevertRequest(); executionService.revert(revertRequestTO); verify(userMgmtStaffRestClient, times(1)).revertDatabase(revertRequestTO); }
@SuppressWarnings("PMD:PrematureDeclaration") public void revert(RevertRequestTO revertRequest) { List<String> logins = userMgmtStaffRestClient.getBranchUserLogins().getBody(); RecoveryPointTO point = dataRestClient.getPoint(revertRequest.getRecoveryPointId()).getBody(); userMgmtStaffRestClient.revertDatabase(revertRequest); cmsDbNativeService.revertDatabase(logins, point.getRollBackTime()); }
RestExecutionService { @SuppressWarnings("PMD:PrematureDeclaration") public void revert(RevertRequestTO revertRequest) { List<String> logins = userMgmtStaffRestClient.getBranchUserLogins().getBody(); RecoveryPointTO point = dataRestClient.getPoint(revertRequest.getRecoveryPointId()).getBody(); userMgmtStaffRestClient.revertDatabase(revertRequest); cmsDbNativeService.revertDatabase(logins, point.getRollBackTime()); } }
RestExecutionService { @SuppressWarnings("PMD:PrematureDeclaration") public void revert(RevertRequestTO revertRequest) { List<String> logins = userMgmtStaffRestClient.getBranchUserLogins().getBody(); RecoveryPointTO point = dataRestClient.getPoint(revertRequest.getRecoveryPointId()).getBody(); userMgmtStaffRestClient.revertDatabase(revertRequest); cmsDbNativeService.revertDatabase(logins, point.getRollBackTime()); }  }
RestExecutionService { @SuppressWarnings("PMD:PrematureDeclaration") public void revert(RevertRequestTO revertRequest) { List<String> logins = userMgmtStaffRestClient.getBranchUserLogins().getBody(); RecoveryPointTO point = dataRestClient.getPoint(revertRequest.getRecoveryPointId()).getBody(); userMgmtStaffRestClient.revertDatabase(revertRequest); cmsDbNativeService.revertDatabase(logins, point.getRollBackTime()); }  void updateLedgers(DataPayload payload); @SuppressWarnings("PMD:PrematureDeclaration") void revert(RevertRequestTO revertRequest); }
RestExecutionService { @SuppressWarnings("PMD:PrematureDeclaration") public void revert(RevertRequestTO revertRequest) { List<String> logins = userMgmtStaffRestClient.getBranchUserLogins().getBody(); RecoveryPointTO point = dataRestClient.getPoint(revertRequest.getRecoveryPointId()).getBody(); userMgmtStaffRestClient.revertDatabase(revertRequest); cmsDbNativeService.revertDatabase(logins, point.getRollBackTime()); }  void updateLedgers(DataPayload payload); @SuppressWarnings("PMD:PrematureDeclaration") void revert(RevertRequestTO revertRequest);  }