@Test public void testReplaceReferenceTokens() { final String AGENDA_ID = UUID.randomUUID().toString(); String tokens = jsonReferenceReplacer.generateReference(AgendaToken.AGENDA_ID.getToken(), null); doReturn(AGENDA_ID).when(mockEnvironmentFieldRetriever).getField(anyString(), anyString()); Assert.assertEquals(replacer.replaceReferenceTokens(tokens, mockLaunchDataWrapper), AGENDA_ID); }
public String replaceReferenceTokens(String tokens, LaunchDataWrapper launchDataWrapper) { String agendaReferenceString = jsonReferenceReplacer.generateReference(AgendaToken.AGENDA_ID.getToken(), null); String agendaId = launchDataWrapper.getEnvironmentRetriever().getField(HandlerField.AGENDA_ID.name(), agendaReferenceString); return StringUtils.replace(tokens, agendaReferenceString, agendaId); }
ReferenceTokenReplacer { public String replaceReferenceTokens(String tokens, LaunchDataWrapper launchDataWrapper) { String agendaReferenceString = jsonReferenceReplacer.generateReference(AgendaToken.AGENDA_ID.getToken(), null); String agendaId = launchDataWrapper.getEnvironmentRetriever().getField(HandlerField.AGENDA_ID.name(), agendaReferenceString); return StringUtils.replace(tokens, agendaReferenceString, agendaId); } }
ReferenceTokenReplacer { public String replaceReferenceTokens(String tokens, LaunchDataWrapper launchDataWrapper) { String agendaReferenceString = jsonReferenceReplacer.generateReference(AgendaToken.AGENDA_ID.getToken(), null); String agendaId = launchDataWrapper.getEnvironmentRetriever().getField(HandlerField.AGENDA_ID.name(), agendaReferenceString); return StringUtils.replace(tokens, agendaReferenceString, agendaId); } ReferenceTokenReplacer(); }
ReferenceTokenReplacer { public String replaceReferenceTokens(String tokens, LaunchDataWrapper launchDataWrapper) { String agendaReferenceString = jsonReferenceReplacer.generateReference(AgendaToken.AGENDA_ID.getToken(), null); String agendaId = launchDataWrapper.getEnvironmentRetriever().getField(HandlerField.AGENDA_ID.name(), agendaReferenceString); return StringUtils.replace(tokens, agendaReferenceString, agendaId); } ReferenceTokenReplacer(); ReferenceTokenReplacer setJsonReferenceReplacer(JsonReferenceReplacer jsonReferenceReplacer); String replaceReferenceTokens(String tokens, LaunchDataWrapper launchDataWrapper); }
ReferenceTokenReplacer { public String replaceReferenceTokens(String tokens, LaunchDataWrapper launchDataWrapper) { String agendaReferenceString = jsonReferenceReplacer.generateReference(AgendaToken.AGENDA_ID.getToken(), null); String agendaId = launchDataWrapper.getEnvironmentRetriever().getField(HandlerField.AGENDA_ID.name(), agendaReferenceString); return StringUtils.replace(tokens, agendaReferenceString, agendaId); } ReferenceTokenReplacer(); ReferenceTokenReplacer setJsonReferenceReplacer(JsonReferenceReplacer jsonReferenceReplacer); String replaceReferenceTokens(String tokens, LaunchDataWrapper launchDataWrapper);  }