    @Test
    public void updateDataKeyVariableWithResponseBody() {

        final ResponseEntity<Object> responseEntity = mock(ResponseEntity.class);
        given(responseEntity.getBody()).willReturn("foo");
        doThrow(RuntimeException.class).when(delegateExecution).setVariable(eq(BaseRESTServiceJavaDelegate.DATA_KEY), isNotNull());
        try {
            baseDelegate.updateDataKeyVariable(delegateExecution, responseEntity);
            fail("Expected RuntimeException to be thrown by mock");
        } catch (RuntimeException re) {
            assertNotNull(re);
        }
    }