@Test public void test_for_cancellation_of_agreement() { final AgreementRequest agreementRequest = getAgreementRequest(); when(allotteeRepository.getAllottees(agreementRequest.getAgreement().getAllottee(), agreementRequest.getRequestInfo())).thenReturn(getAllotteeResponse()); when(positionRestRepository.getPositions(any(), any(), any())) .thenReturn(getPositionResponse()); when(lamsConfigurationService.getLamsConfigurations(any())) .thenReturn(getDesignationsList()); when(acknowledgementNumberService.generateAcknowledgeNumber()) .thenReturn("AA453DD"); final Agreement agreement = agreementService.createCancellation(agreementRequest); assertEquals("454", agreement.getCouncilNumber()); assertEquals("AA453DD", agreement.getAcknowledgementNumber()); }
public Agreement createCancellation(final AgreementRequest agreementRequest) { log.info("create Cancellation of agreement::" + agreementRequest.getAgreement()); final Agreement agreement = enrichAgreement(agreementRequest); final ProcessInstance processInstanceResponse = workFlowRepository.startWorkflow(agreementRequest); log.info("the processInstanceresponse from workflow statrt : " + processInstanceResponse); return agreement; }
AgreementService { public Agreement createCancellation(final AgreementRequest agreementRequest) { log.info("create Cancellation of agreement::" + agreementRequest.getAgreement()); final Agreement agreement = enrichAgreement(agreementRequest); final ProcessInstance processInstanceResponse = workFlowRepository.startWorkflow(agreementRequest); log.info("the processInstanceresponse from workflow statrt : " + processInstanceResponse); return agreement; } }
AgreementService { public Agreement createCancellation(final AgreementRequest agreementRequest) { log.info("create Cancellation of agreement::" + agreementRequest.getAgreement()); final Agreement agreement = enrichAgreement(agreementRequest); final ProcessInstance processInstanceResponse = workFlowRepository.startWorkflow(agreementRequest); log.info("the processInstanceresponse from workflow statrt : " + processInstanceResponse); return agreement; }  }
AgreementService { public Agreement createCancellation(final AgreementRequest agreementRequest) { log.info("create Cancellation of agreement::" + agreementRequest.getAgreement()); final Agreement agreement = enrichAgreement(agreementRequest); final ProcessInstance processInstanceResponse = workFlowRepository.startWorkflow(agreementRequest); log.info("the processInstanceresponse from workflow statrt : " + processInstanceResponse); return agreement; }  boolean isAgreementExist(final String code); List<Agreement> getAgreementsForAssetId(final Long assetId); List<Agreement> getAgreementsForAssetIdAndFloor(final Agreement agreement, final Long assetId); List<Agreement> getAllHistoryAgreementsForAsset(final Agreement agreement); Agreement createAgreement(final AgreementRequest agreementRequest); Agreement modifyAgreement(final AgreementRequest agreementRequest); Agreement createEviction(final AgreementRequest agreementRequest); Agreement createCancellation(final AgreementRequest agreementRequest); Agreement createRenewal(final AgreementRequest agreementRequest); Agreement createObjection(final AgreementRequest agreementRequest); Agreement createJudgement(final AgreementRequest agreementRequest); Agreement createRemission(final AgreementRequest agreementRequest); Agreement updateAgreement(final AgreementRequest agreementRequest); Agreement updateCancellation(final AgreementRequest agreementRequest); Agreement updateEviction(final AgreementRequest agreementRequest); Agreement updateObjectionAndJudgement(final AgreementRequest agreementRequest); Agreement updateRenewal(final AgreementRequest agreementRequest); Agreement updateRemission(final AgreementRequest agreementRequest); Agreement saveRemission(final AgreementRequest agreementRequest); List<Agreement> searchAgreement(final AgreementCriteria agreementCriteria, final RequestInfo requestInfo); List<Agreement> searchAgreementByAgreementNo(final AgreementCriteria agreementCriteria, final RequestInfo requestInfo); List<Agreement> getAgreementsByAgreementNumber(final AgreementCriteria agreementCriteria,
            final RequestInfo requestInfo); List<Demand> prepareLegacyDemands(final AgreementRequest agreementRequest); List<Demand> prepareDemands(final AgreementRequest agreementRequest); List<Demand> getDemands(final AgreementRequest agreementRequest); void updateAdvanceFlag(final Agreement agreement); Date getExpiryDate(final Agreement agreement); String checkRenewalStatus(final AgreementRequest agreementRequest); String checkObjectionStatus(final AgreementRequest agreementRequest); void setDetailsByAssetCategory(final Agreement agreement); Date getEffectiveFinYearToDate(); }
AgreementService { public Agreement createCancellation(final AgreementRequest agreementRequest) { log.info("create Cancellation of agreement::" + agreementRequest.getAgreement()); final Agreement agreement = enrichAgreement(agreementRequest); final ProcessInstance processInstanceResponse = workFlowRepository.startWorkflow(agreementRequest); log.info("the processInstanceresponse from workflow statrt : " + processInstanceResponse); return agreement; }  boolean isAgreementExist(final String code); List<Agreement> getAgreementsForAssetId(final Long assetId); List<Agreement> getAgreementsForAssetIdAndFloor(final Agreement agreement, final Long assetId); List<Agreement> getAllHistoryAgreementsForAsset(final Agreement agreement); Agreement createAgreement(final AgreementRequest agreementRequest); Agreement modifyAgreement(final AgreementRequest agreementRequest); Agreement createEviction(final AgreementRequest agreementRequest); Agreement createCancellation(final AgreementRequest agreementRequest); Agreement createRenewal(final AgreementRequest agreementRequest); Agreement createObjection(final AgreementRequest agreementRequest); Agreement createJudgement(final AgreementRequest agreementRequest); Agreement createRemission(final AgreementRequest agreementRequest); Agreement updateAgreement(final AgreementRequest agreementRequest); Agreement updateCancellation(final AgreementRequest agreementRequest); Agreement updateEviction(final AgreementRequest agreementRequest); Agreement updateObjectionAndJudgement(final AgreementRequest agreementRequest); Agreement updateRenewal(final AgreementRequest agreementRequest); Agreement updateRemission(final AgreementRequest agreementRequest); Agreement saveRemission(final AgreementRequest agreementRequest); List<Agreement> searchAgreement(final AgreementCriteria agreementCriteria, final RequestInfo requestInfo); List<Agreement> searchAgreementByAgreementNo(final AgreementCriteria agreementCriteria, final RequestInfo requestInfo); List<Agreement> getAgreementsByAgreementNumber(final AgreementCriteria agreementCriteria,
            final RequestInfo requestInfo); List<Demand> prepareLegacyDemands(final AgreementRequest agreementRequest); List<Demand> prepareDemands(final AgreementRequest agreementRequest); List<Demand> getDemands(final AgreementRequest agreementRequest); void updateAdvanceFlag(final Agreement agreement); Date getExpiryDate(final Agreement agreement); String checkRenewalStatus(final AgreementRequest agreementRequest); String checkObjectionStatus(final AgreementRequest agreementRequest); void setDetailsByAssetCategory(final Agreement agreement); Date getEffectiveFinYearToDate(); static final String WF_ACTION_APPROVE; static final String WF_ACTION_REJECT; static final String WF_ACTION_CANCEL; static final String WF_ACTION_FORWARD; static final String WF_ACTION_PRINT_NOTICE; static final String LAMS_WORKFLOW_INITIATOR_DESIGNATION; }