@Test
public void shouldDecodePathParams() throws IOException {

    UUID userId = UUID.randomUUID();
    when(requestMock.getMethod()).thenReturn("GET");
    when(requestMock.getPathInfo()).thenReturn("/user/" + userId + "/message/abc");
    servlet.service(requestMock, responseMock);
    verify(responseMock).sendRedirect("https://messages.example.com/?user=" + userId + "&message=abc");
}