@Test
public void tesUseDefaultSRS() throws IOException,
        NoSuchAuthorityCodeException, FactoryException {

    final InputStream dataStream = TestData.openStream(this,
            CUBEWERX_GOVUNITCE.DATA);
    TestHttpResponse httpResponse = new TestHttpResponse(
            "text/xml; subtype=gml/3.1.1", "UTF-8", dataStream);
    TestHttpProtocol mockHttp = new TestHttpProtocol(httpResponse);
    createTestProtocol(CUBEWERX_GOVUNITCE.CAPABILITIES, mockHttp);

    // override the describe feature type url so it loads from the test resource
    URL describeUrl = TestData.getResource(this, CUBEWERX_GOVUNITCE.SCHEMA);
    wfs.setDescribeFeatureTypeURLOverride(describeUrl);

    WFS_1_1_0_DataStore ds = new WFS_1_1_0_DataStore(wfs);
    Query query = new Query(CUBEWERX_GOVUNITCE.FEATURETYPENAME);

    // use the OtherSRS
    CoordinateReferenceSystem otherCrs = CRS
            .decode(CUBEWERX_GOVUNITCE.ALTERNATIVECRS);
    query.setCoordinateSystem(otherCrs);
    FeatureReader<SimpleFeatureType, SimpleFeature> featureReader;
    featureReader = ds.getFeatureReader(query, Transaction.AUTO_COMMIT);
    assertNotNull(featureReader);
    assertTrue(featureReader instanceof ForceCoordinateSystemFeatureReader);
    assertEquals(otherCrs, featureReader.getFeatureType()
            .getCoordinateReferenceSystem());
    GetFeature request = wfs.getRequest();
    assertEquals(CUBEWERX_GOVUNITCE.ALTERNATIVECRS, request.getSrsName());

    // use an SRS not supported by server
    CoordinateReferenceSystem unknownCrs = CRS.decode("EPSG:3003");
    query.setCoordinateSystem(unknownCrs);

    featureReader = ds.getFeatureReader(query, Transaction.AUTO_COMMIT);
    assertNotNull(featureReader);
    assertTrue(featureReader instanceof ReprojectFeatureReader);
    assertEquals(unknownCrs, featureReader.getFeatureType()
            .getCoordinateReferenceSystem());
    request = wfs.getRequest();
    assertEquals(CUBEWERX_GOVUNITCE.CRS, request.getSrsName());
}