@Test public void shouldGetEidData() { when(mockApduChannel.transmitAPDU(any(String.class))) .thenReturn("bf3e125a10890440500010006800000000000001709000"); String eidData = getIdWorker.run(buildStringLpadWorkerExchange(ApduUtils.getEIDApdu())); assertEquals("89044050001000680000000000000170", eidData); verify(mockProgress, times(1)) .setTotalSteps(3); verify(mockProgress, times(1)) .stepExecuted(ProgressStep.GET_EID_RETRIEVING, "getEID retrieving..."); verify(mockProgress, times(1)) .stepExecuted(ProgressStep.GET_EID_CONVERTING, "getEID converting..."); verify(mockProgress, times(1)) .stepExecuted(ProgressStep.GET_EID_CONVERTED, "getEID converted..."); }
public String run(final LpadWorkerExchange<String> lpadWorkerExchange) { progress.setTotalSteps(3); progress.stepExecuted(ProgressStep.GET_EID_RETRIEVING, "getEID retrieving..."); inputValidation(lpadWorkerExchange == null, "Lpa dWorker Exchange must be provided"); inputValidation(StringUtils.isBlank(lpadWorkerExchange.getBody()), "EID APDU must be provided"); logDebug("EID APDU: " + lpadWorkerExchange); String eidapduResponseStr = apduChannel.transmitAPDU(lpadWorkerExchange.getBody()); logDebug("Response: " + eidapduResponseStr); return convertGetEuiccData(eidapduResponseStr, progress); }
GetEidLpadWorker implements LpadWorker<LpadWorkerExchange<String>, String> { public String run(final LpadWorkerExchange<String> lpadWorkerExchange) { progress.setTotalSteps(3); progress.stepExecuted(ProgressStep.GET_EID_RETRIEVING, "getEID retrieving..."); inputValidation(lpadWorkerExchange == null, "Lpa dWorker Exchange must be provided"); inputValidation(StringUtils.isBlank(lpadWorkerExchange.getBody()), "EID APDU must be provided"); logDebug("EID APDU: " + lpadWorkerExchange); String eidapduResponseStr = apduChannel.transmitAPDU(lpadWorkerExchange.getBody()); logDebug("Response: " + eidapduResponseStr); return convertGetEuiccData(eidapduResponseStr, progress); } }
GetEidLpadWorker implements LpadWorker<LpadWorkerExchange<String>, String> { public String run(final LpadWorkerExchange<String> lpadWorkerExchange) { progress.setTotalSteps(3); progress.stepExecuted(ProgressStep.GET_EID_RETRIEVING, "getEID retrieving..."); inputValidation(lpadWorkerExchange == null, "Lpa dWorker Exchange must be provided"); inputValidation(StringUtils.isBlank(lpadWorkerExchange.getBody()), "EID APDU must be provided"); logDebug("EID APDU: " + lpadWorkerExchange); String eidapduResponseStr = apduChannel.transmitAPDU(lpadWorkerExchange.getBody()); logDebug("Response: " + eidapduResponseStr); return convertGetEuiccData(eidapduResponseStr, progress); } GetEidLpadWorker(final Progress progress,
                            final ApduChannel apduChannel); }
GetEidLpadWorker implements LpadWorker<LpadWorkerExchange<String>, String> { public String run(final LpadWorkerExchange<String> lpadWorkerExchange) { progress.setTotalSteps(3); progress.stepExecuted(ProgressStep.GET_EID_RETRIEVING, "getEID retrieving..."); inputValidation(lpadWorkerExchange == null, "Lpa dWorker Exchange must be provided"); inputValidation(StringUtils.isBlank(lpadWorkerExchange.getBody()), "EID APDU must be provided"); logDebug("EID APDU: " + lpadWorkerExchange); String eidapduResponseStr = apduChannel.transmitAPDU(lpadWorkerExchange.getBody()); logDebug("Response: " + eidapduResponseStr); return convertGetEuiccData(eidapduResponseStr, progress); } GetEidLpadWorker(final Progress progress,
                            final ApduChannel apduChannel); String run(final LpadWorkerExchange<String> lpadWorkerExchange); }
GetEidLpadWorker implements LpadWorker<LpadWorkerExchange<String>, String> { public String run(final LpadWorkerExchange<String> lpadWorkerExchange) { progress.setTotalSteps(3); progress.stepExecuted(ProgressStep.GET_EID_RETRIEVING, "getEID retrieving..."); inputValidation(lpadWorkerExchange == null, "Lpa dWorker Exchange must be provided"); inputValidation(StringUtils.isBlank(lpadWorkerExchange.getBody()), "EID APDU must be provided"); logDebug("EID APDU: " + lpadWorkerExchange); String eidapduResponseStr = apduChannel.transmitAPDU(lpadWorkerExchange.getBody()); logDebug("Response: " + eidapduResponseStr); return convertGetEuiccData(eidapduResponseStr, progress); } GetEidLpadWorker(final Progress progress,
                            final ApduChannel apduChannel); String run(final LpadWorkerExchange<String> lpadWorkerExchange);  }