RestResponse implements Message { @Override public String resolveName(final ParameterList parameters) { String name = restUrlMappingMessageNameResolver.resolve(request, parameters); return name.isEmpty() ? "" : name + POSTFIX; } RestResponse(final WilmaHttpEntity entity, final Converter converter, final WilmaHttpRequest request); @Override String resolveName(final ParameterList parameters); @Override String convert(final String name);  }
@Test public void testResolveNameShouldReturnResolvedNameWithPostfix() { given(restUrlMappingMessageNameResolver.resolve(request, parameters)).willReturn("name"); String result = underTest.resolveName(parameters); String expected = "name" + POSTFIX; assertEquals(expected, result); }
@Test public void testResolveNameShouldReturnEmptyStringWhenResolvedNameIsEmpty() { given(restUrlMappingMessageNameResolver.resolve(request, parameters)).willReturn(""); String result = underTest.resolveName(parameters); String expected = ""; assertEquals(expected, result); }