@Test
public void testReadOneFeature() throws Exception {

	MockHttpServletRequest request = new MockHttpServletRequest();
	request.setRequestURI("/rest/beans/1.json");
	request.setMethod("GET");
	MockHttpServletResponse response = new MockHttpServletResponse();
	ModelAndView mav = adapter.handle(request, response, restController);
	Object o = mav.getModel().get(RestController.FEATURE_COLLECTION);
	Assert.assertTrue(o instanceof InternalFeature);
	InternalFeature feature = (InternalFeature) o;
	Assert.assertEquals("bean1", feature.getAttributes().get("stringAttr").getValue());
	Assert.assertEquals(true, feature.getAttributes().get("booleanAttr").getValue());
	Assert.assertEquals("100,23", feature.getAttributes().get("currencyAttr").getValue());
	Calendar c = Calendar.getInstance();
	c.set(2010, 1, 23, 0, 0, 0);
	c.set(Calendar.MILLISECOND, 0);
	Assert.assertEquals(c.getTime(), feature.getAttributes().get("dateAttr").getValue());
	Assert.assertEquals(123.456, feature.getAttributes().get("doubleAttr").getValue());
	Assert.assertEquals(456.789F, feature.getAttributes().get("floatAttr").getValue());
	Assert.assertEquals("http://www.geomajas.org/image1",
			fixSlash(feature.getAttributes().get("imageUrlAttr").getValue().toString()));
	Assert.assertEquals(789, feature.getAttributes().get("integerAttr").getValue());
	Assert.assertEquals(123456789L, feature.getAttributes().get("longAttr").getValue());
	Assert.assertEquals((short) 123, feature.getAttributes().get("shortAttr").getValue());
	Assert.assertEquals("http://www.geomajas.org/url1",
			fixSlash(feature.getAttributes().get("urlAttr").getValue().toString()));
	view.render(mav.getModel(), request, response);
	response.flushBuffer();
	Object json = new JSONParser().parse(response.getContentAsString());
	String isodate = GeoJSONUtil.DATE_FORMAT.format(c.getTime());
	Assert.assertTrue(json instanceof JSONObject);
	Assert.assertEquals("{\"type\":\"Feature\"," + "\"geometry\":{\"type\":\"MultiPolygon\","
			+ "\"coordinates\":[[[[0.0,0.0],[1,0.0],[1,1],[0.0,1],[0.0,0.0]]]]}," + "\"properties\":{"
			+ "\"stringAttr\":\"bean1\"," + "\"booleanAttr\":true," + "\"currencyAttr\":\"100,23\","
			+ "\"dateAttr\":\"" + isodate + "\"," + "\"doubleAttr\":123.456,\"floatAttr\":456.789,"
			+ "\"imageUrlAttr\":\"http://www.geomajas.org/image1\","
			+ "\"integerAttr\":789,\"longAttr\":123456789," + "\"shortAttr\":123,"
			+ "\"urlAttr\":\"http://www.geomajas.org/url1\"}," + "\"id\":\"1\"}",
			fixSlash(response.getContentAsString()));
}