{
JacksonXMLProvider prov = new JacksonXMLProvider();
ByteArrayOutputStream out = new ByteArrayOutputStream();
Bean bean = new Bean();
Method m = getClass().getDeclaredMethod("bogus");
JsonView view = m.getAnnotation(JsonView.class);
assertNotNull(view); // just a sanity check
prov.writeTo(bean, bean.getClass(), bean.getClass(), new Annotation[] { view },
MediaType.APPLICATION_JSON_TYPE, null, out);
assertEquals("<Bean><value1>1</value1></Bean>", out.toString("UTF-8"));
}