@Test
public void testBeanToDocument() {

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