@Test
public void shouldDeserializeWithAppropriateDeserializer() throws Exception {

    InputStream stream = mock(InputStream.class);
    when(mockResponse.getContentType()).thenReturn("mime2");
    when(mockResponse.getExpectedType()).thenReturn((Class)int.class);
    when(mockResponse.getExpectedGenericType()).thenReturn(int.class);
    when(mockResponse.getCharset()).thenReturn(UTF8);
    when(mockResponse.asStream()).thenReturn(stream);
    when(mockDeserializerMime2.deserialize(int.class, int.class, stream, UTF8)).thenReturn(123);
    int actual = toTest.<Integer>deserialize(mockResponse);
    assertEquals(123, actual);
}