@Test
public void testDocumentToBean() {

	//测试普通对象
	String data = "测试数据";
	String msg = "成功了";
	Integer code = Integer.valueOf(10);
	ResultBean<String> resultBean = new ResultBean(data);
	resultBean.setMsg(msg);
	
	try {
		Document doc = MongoDBUtils.beanToDocument(resultBean);
		assertEquals(doc.get("data", String.class), resultBean.getData());
		assertEquals(doc.get("msg", String.class), resultBean.getMsg());
		assertEquals(doc.get("rtnCode", Integer.class), Integer.valueOf(resultBean.getRtnCode()));
	} catch (IllegalArgumentException | IllegalAccessException e) {
		e.printStackTrace();
	}
	
}