@Override
    public SmileResponse<T> handle(Request request, Response response)
    {
        byte[] bytes = readResponseBytes(response);
        String contentType = response.getHeader(CONTENT_TYPE);
        if ((contentType == null) || !MediaType.parse(contentType).is(MEDIA_TYPE_SMILE)) {
            return new SmileResponse<>(response.getStatusCode(), response.getHeaders(), bytes);
        }
        return new SmileResponse<>(response.getStatusCode(), response.getHeaders(), smileCodec, bytes);
    }
@Test
    public void testInvalidSmileGetValue()
    {
        byte[] invalidSmileBytes = "test".getBytes(UTF_8);
        SmileResponse<User> response = handler.handle(null, mockResponse(OK, MEDIA_TYPE_SMILE, invalidSmileBytes));

        try {
            response.getValue();
            fail("expected exception");
        }
        catch (IllegalStateException e) {
            assertEquals(e.getMessage(), "Response does not contain a SMILE value");
            assertEquals(e.getCause(), response.getException());

            assertEquals(response.getSmileBytes(), invalidSmileBytes);
            assertEquals(response.getResponseBytes(), response.getSmileBytes());
        }
    }