### Question:
WebService extends BaseTransform<WebServiceMeta, WebServiceData> implements ITransform<WebServiceMeta, WebServiceData> { static String getLocationFrom( HttpPost method ) { Header locationHeader = method.getFirstHeader( "Location" ); return locationHeader.getValue(); } WebService( TransformMeta aTransformMeta, WebServiceMeta meta, WebServiceData data, int value, PipelineMeta aPipelineMeta, Pipeline aPipeline ); boolean processRow(); boolean init(); void dispose(); static final String NS_PREFIX; }### Answer:
@Test public void getLocationFrom() { HttpPost postMethod = mock( HttpPost.class ); Header locationHeader = new BasicHeader( LOCATION_HEADER, TEST_URL ); doReturn( locationHeader ).when( postMethod ).getFirstHeader( LOCATION_HEADER ); assertEquals( TEST_URL, WebService.getLocationFrom( postMethod ) ); }