}
@Test
public void setUserMetaMethod()
{
RiakUserMetadata meta = new RiakUserMetadata();
meta.put("key1", "value1");
meta.put("key2", "value2");
meta.put("key3", "value3");
meta.put(META_KEY_ONE, "userMetaItemOne");
PojoWithAnnotatedMethods obj = new PojoWithAnnotatedMethods();
AnnotationUtil.populateUsermeta(meta, obj);
assertNotNull(obj.usermeta);
// The single annotated field is removed
assertEquals(3, obj.usermeta.size());
for (String key : obj.usermeta.keySet())
{
assertTrue(meta.containsKey(key));
assertEquals(meta.get(key), obj.usermeta.get(key));
}
assertNotNull(obj.metaItemOne);
assertEquals("userMetaItemOne", obj.metaItemOne);