@Test
public void testAsEntity() throws LayerException {

	BeanEntityMapper mapper = new BeanEntityMapper();
	FeatureBean bean = new FeatureBean();
	bean.setId(3L);
	ManyToOneAttributeBean many = new ManyToOneAttributeBean();
	many.setId(4L);
	bean.setManyToOneAttr(many);
	Entity entity = mapper.asEntity(bean);
	Assert.assertEquals(new Long(3L), entity.getId("id"));
	Assert.assertEquals(new Long(4L), entity.getChild("manyToOneAttr").getId("id"));
}