SoapMessage implements Message { @Override public String convert(final String name) { return converter.convert(entity.getBody(), name); } SoapMessage(final WilmaHttpEntity entity, final Converter converter); @Override String resolveName(final ParameterList parameters); @Override String convert(final String name);  }
@Test public void testConvertShouldReturnWhatConverterReturns() { given(entity.getBody()).willReturn("data"); given(converter.convert("data", "name")).willReturn("converted data"); String result = underTest.convert("name"); assertEquals("converted data", result); }