WsdlProject project = new WsdlProject();
RestService restService1 = (RestService) project
.addNewInterface(INTERFACE_NAME, RestServiceFactory.REST_TYPE);
RestService restService2 = (RestService) project
.addNewInterface(INTERFACE_NAME, RestServiceFactory.REST_TYPE);
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)));
}