@Test
public void shouldDeserializeInputStreamUsingGivenJaxbWithGivenArgs() throws Exception {

    Class arg1 = Object.class;
    Type arg2 = String.class;
    InputStream arg3 = toInputStream("hello");
    Charset arg4 = UTF8;
    Object expected = new Object();
    ArgumentCaptor<InputStreamReader> reader = ArgumentCaptor.forClass(InputStreamReader.class);
    when(mockJaxb.unmarshal(eq(arg1), eq(arg2), reader.capture())).thenReturn(expected);
    Object actual = toTest.deserialize(arg1, arg2, arg3, arg4);
    InputStreamReader actualInputStream = reader.getValue();
    assertEquals("UTF8", actualInputStream.getEncoding());
    assertEquals("hello", IOs.toString(actualInputStream));
    assertSame(expected, actual);
}