* @throws Exception
*/
public void testVersion() throws Exception {
try {
// good request, version 14
MockHttpServletResponse resp = getAsServletResponse("wfs?request=GetFeature&typeName=Polygons&outputFormat=dxf&format_options=version:14");
String sResponse = resp.getOutputStreamContent();
assertNotNull(sResponse);
assertTrue(sResponse.startsWith(" 0"));
// bad request, version 13: not supported
resp = getAsServletResponse("wfs?request=GetFeature&typeName=Polygons&outputFormat=dxf&format_options=version:13");
sResponse = resp.getOutputStreamContent();
assertNotNull(sResponse);
// has to return an exception
assertTrue(sResponse.indexOf("</ows:ExceptionReport>") != -1);
} catch (Throwable t) {
fail(t.getMessage());