@Test public void theTransmissionFailedProfileNotInDisabledState(){ String iccid = "89445035401458888888"; String eResponse = ToTLV.toTLV("BF33", ToTLV.toTLV("80", "02")); when(mockApduChannel.transmitAPDU(any(String.class))).thenReturn(eResponse); deleteProfileWorker.run(buildLpadWorkerExchange(buildDeleteProfileInputParams(iccid))); verify(mockProgress, times(1)).setTotalSteps(3); verify(mockProgress, times(1)) .stepExecuted(ProgressStep.DELETE_PROFILE_DELETING_PROFILE, iccid + " delete profile"); verify(mockProgress, times(1)) .stepExecuted(ProgressStep.DELETE_PROFILE_CONVERTING_RESPONSE, "Converting response"); verify(mockApduChannel, times(0)).sendStatus(); verify(mockProgress, times(0)) .stepExecuted(ProgressStep.DELETE_PROFILE_DELETED, iccid + " deleted successfully"); verify(mockProgress, times(1)) .stepExecuted(ProgressStep.DELETE_PROFILE_NOT_DELETED, iccid + " profile not deleted"); }
public String run(final LpadWorkerExchange<DeleteProfileInputParams> lpadWorkerExchange) { inputValidation(lpadWorkerExchange == null, "Input params to invoke Delete Profile must not be null"); inputValidation(lpadWorkerExchange.getBody() == null, "Input params must have body defined"); inputValidation(StringUtils.isBlank(lpadWorkerExchange.getBody().getIccid()), "ICCID must not be null/empty"); String iccid = lpadWorkerExchange.getBody().getIccid(); String eResponse = transmitDeleteProfile(iccid, progress); return convertDeleteProfile(iccid, progress, eResponse); }
DeleteProfileWorker implements LpadWorker<LpadWorkerExchange<DeleteProfileWorker.DeleteProfileInputParams>, String> { public String run(final LpadWorkerExchange<DeleteProfileInputParams> lpadWorkerExchange) { inputValidation(lpadWorkerExchange == null, "Input params to invoke Delete Profile must not be null"); inputValidation(lpadWorkerExchange.getBody() == null, "Input params must have body defined"); inputValidation(StringUtils.isBlank(lpadWorkerExchange.getBody().getIccid()), "ICCID must not be null/empty"); String iccid = lpadWorkerExchange.getBody().getIccid(); String eResponse = transmitDeleteProfile(iccid, progress); return convertDeleteProfile(iccid, progress, eResponse); } }
DeleteProfileWorker implements LpadWorker<LpadWorkerExchange<DeleteProfileWorker.DeleteProfileInputParams>, String> { public String run(final LpadWorkerExchange<DeleteProfileInputParams> lpadWorkerExchange) { inputValidation(lpadWorkerExchange == null, "Input params to invoke Delete Profile must not be null"); inputValidation(lpadWorkerExchange.getBody() == null, "Input params must have body defined"); inputValidation(StringUtils.isBlank(lpadWorkerExchange.getBody().getIccid()), "ICCID must not be null/empty"); String iccid = lpadWorkerExchange.getBody().getIccid(); String eResponse = transmitDeleteProfile(iccid, progress); return convertDeleteProfile(iccid, progress, eResponse); } DeleteProfileWorker(Progress progress, ApduChannel apduChannel); }
DeleteProfileWorker implements LpadWorker<LpadWorkerExchange<DeleteProfileWorker.DeleteProfileInputParams>, String> { public String run(final LpadWorkerExchange<DeleteProfileInputParams> lpadWorkerExchange) { inputValidation(lpadWorkerExchange == null, "Input params to invoke Delete Profile must not be null"); inputValidation(lpadWorkerExchange.getBody() == null, "Input params must have body defined"); inputValidation(StringUtils.isBlank(lpadWorkerExchange.getBody().getIccid()), "ICCID must not be null/empty"); String iccid = lpadWorkerExchange.getBody().getIccid(); String eResponse = transmitDeleteProfile(iccid, progress); return convertDeleteProfile(iccid, progress, eResponse); } DeleteProfileWorker(Progress progress, ApduChannel apduChannel); String run(final LpadWorkerExchange<DeleteProfileInputParams> lpadWorkerExchange); }
DeleteProfileWorker implements LpadWorker<LpadWorkerExchange<DeleteProfileWorker.DeleteProfileInputParams>, String> { public String run(final LpadWorkerExchange<DeleteProfileInputParams> lpadWorkerExchange) { inputValidation(lpadWorkerExchange == null, "Input params to invoke Delete Profile must not be null"); inputValidation(lpadWorkerExchange.getBody() == null, "Input params must have body defined"); inputValidation(StringUtils.isBlank(lpadWorkerExchange.getBody().getIccid()), "ICCID must not be null/empty"); String iccid = lpadWorkerExchange.getBody().getIccid(); String eResponse = transmitDeleteProfile(iccid, progress); return convertDeleteProfile(iccid, progress, eResponse); } DeleteProfileWorker(Progress progress, ApduChannel apduChannel); String run(final LpadWorkerExchange<DeleteProfileInputParams> lpadWorkerExchange);  }