* as published. It wasn't being the case due to comparing the resource's name instead of the
* nativeName against the name the DataStore provides
*/
public void testPublishedUnpublishedWithChangedResourceName() {
Catalog catalog = getCatalog();
StoreInfo cite = catalog.getStoreByName(MockData.CITE_PREFIX, StoreInfo.class);
List<FeatureTypeInfo> resources = catalog.getResourcesByStore(cite, FeatureTypeInfo.class);
assertTrue(resources.size() > 0);
final int numberOfPublishedResources = resources.size();
NewLayerPageProvider provider = new NewLayerPageProvider();
provider.setStoreId(cite.getId());
provider.setShowPublished(false);
assertEquals(0, provider.size());
provider.setShowPublished(true);
assertEquals(numberOfPublishedResources, provider.size());
FeatureTypeInfo typeInfo = resources.get(0);
typeInfo.setName("notTheNativeName");
catalog.save(typeInfo);
provider = new NewLayerPageProvider();
provider.setStoreId(cite.getId());
provider.setShowPublished(true);
assertEquals(numberOfPublishedResources, provider.size());
provider.setShowPublished(false);