@Test
public void testGetRemoteFeatureType() throws Exception {

    DescribeFeatureTypeRequest req = mock(DescribeFeatureTypeRequest.class);
    when(wfs.createDescribeFeatureTypeRequest()).thenReturn(req);
    DescribeFeatureTypeResponse resp = mock(DescribeFeatureTypeResponse.class);
    when(wfs.issueRequest(same(req))).thenReturn(resp);
    when(resp.getFeatureType()).thenReturn(featureType2);
    dataStore = spy(new WFSDataStore(wfs));
    assertSame(featureType2, dataStore.getRemoteSimpleFeatureType(TYPE2));
    verify(req).setTypeName(eq(TYPE2));
    when(wfs.issueRequest(same(req))).thenThrow(new IOException());
    try {
        QName badName = new QName(TYPE1.getNamespaceURI(), TYPE1.getLocalPart() + "2");
        dataStore.getRemoteSimpleFeatureType(badName);
        fail("Expected IOE");
    } catch (IOException e) {
        assertTrue(true);
    }
}