@Test(expected = BadRequestException.class)
public void testIgnoreNamespacesPackageInfo() throws Exception {
JSONProvider<Book2> p = new JSONProvider<Book2>();
p.setIgnoreNamespaces(true);
Book2 book = new Book2(123);
book.setName("CXF");
ByteArrayOutputStream os = new ByteArrayOutputStream();
p.writeTo(book, Book2.class, Book2.class, Book2.class.getAnnotations(),
MediaType.APPLICATION_JSON_TYPE, new MetadataMap<String, Object>(), os);