### Question:
JsonBindingProvider extends AbstractMessageReaderWriterProvider<Object> { @Override public Object readFrom(Class<Object> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, String> httpHeaders, InputStream entityStream) throws IOException, WebApplicationException { final EntityInputStream entityInputStream = new EntityInputStream(entityStream); entityStream = entityInputStream; if (entityInputStream.isEmpty()) { throw new NoContentException(LocalizationMessages.ERROR_JSONB_EMPTYSTREAM()); } Jsonb jsonb = getJsonb(type); try { return jsonb.fromJson(entityStream, genericType); } catch (JsonbException e) { throw new ProcessingException(LocalizationMessages.ERROR_JSONB_DESERIALIZATION(), e); } } JsonBindingProvider(@Context Providers providers); @Override boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType); @Override Object readFrom(Class<Object> type, Type genericType,
                           Annotation[] annotations,
                           MediaType mediaType,
                           MultivaluedMap<String, String> httpHeaders,
                           InputStream entityStream); @Override boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType); @Override void writeTo(Object o, Class<?> type, Type genericType,
                        Annotation[] annotations,
                        MediaType mediaType,
                        MultivaluedMap<String, Object> httpHeaders,
                        OutputStream entityStream);  }### Answer:
@Test(expected = NoContentException.class) public final void shouldThrowNoContentException() throws IOException { final Providers providers = new EmptyProviders(); final MessageBodyReader<Foo> mbr = (MessageBodyReader) new JsonBindingProvider(providers); mbr.readFrom(Foo.class, Foo.class, new Annotation[0], APPLICATION_JSON_TYPE, new MultivaluedHashMap<>(), new ByteArrayInputStream(new byte[0])); }