public void testJsonToActivity() throws Exception {
String jsonActivity = "{userId : 5, id : 6, mediaItems : ["
+ "{url : 'hello', mimeType : 'mimey', type : 'video'}"
+ "]}";
// TODO: rename the enums to be lowercase
Activity result = beanJsonConverter.convertToObject(jsonActivity,
Activity.class);
assertEquals("5", result.getUserId());
assertEquals("6", result.getId());
assertEquals(1, result.getMediaItems().size());
MediaItem actualItem = result.getMediaItems().get(0);
assertEquals("hello", actualItem.getUrl());
assertEquals("mimey", actualItem.getMimeType());
assertEquals("video", actualItem.getType().toString());
}