RestResource restResource = restService2.addNewResource(RESOURCE_NAME, PATH);
restResource.addNewMethod(METHOD_NAME);
Mockito.when(testCase.getParent()).thenReturn(project);
TestStepConfig config = TestStepConfig.Factory.newInstance();
RestRequestStepConfig configConfig = (RestRequestStepConfig) config.addNewConfig().changeType(RestRequestStepConfig.type);
configConfig.setService(INTERFACE_NAME);
configConfig.setResourcePath(PATH);
configConfig.setMethodName(METHOD_NAME);
configConfig.setRestRequest(RestRequestConfig.Factory.newInstance());
RestTestRequestStep step = new RestTestRequestStep(testCase, config, false);
RestResource foundResource = step.getResource();
assertThat(foundResource, is(sameInstance(restResource)));
}