### Question:
JsonContextUpdater implements OnOperationCompleteListener, JsonContextReferenceParser { protected static String getReferenceName(JsonReferenceReplacer jsonReferenceReplacer, String reference) { String referenceName = jsonReferenceReplacer.getReferenceName(reference); if(referenceName != null) { return referenceName.endsWith(OperationReference.OUTPUT.getSuffix()) ? referenceName.substring(0, referenceName.length() - OperationReference.OUTPUT.getSuffix().length()) : referenceName; } else { throw new RuntimeException(String.format("Invalid reference name found: %1$s", reference)); } } JsonContextUpdater(ExecutorContext executorContext); @Override void onComplete(OperationWrapper operationWrapper); Set<String> getOperationNames(Set<String> references);  }### Answer:
@Test(dataProvider = "getReferenceNameProvider") public void testGetReferenceName(String reference, String expectedResult) { Assert.assertEquals(JsonContextUpdater.getReferenceName(jsonReferenceReplacer, reference), expectedResult); }
@Test(dataProvider = "getReferenceNameProviderErrorCases", expectedExceptions = RuntimeException.class) public void testGetReferenceNameException(String reference) { JsonContextUpdater.getReferenceName(jsonReferenceReplacer, reference); }