when(mockMediator.hasTileLayer(any(CatalogInfo.class))).thenReturn(true);
when(mockMediator.getTileLayer(any(CatalogInfo.class))).thenReturn(tileLayer);
listener.handleModifyEvent(modifyEvent);
CatalogPostModifyEvent postModifyEvent = mock(CatalogPostModifyEvent.class);
// the tile layer must exist on the layer metadata otherwise the event will be ignored
when(mockLayerInfo.getStyles()).thenReturn(newStyles);
when(postModifyEvent.getSource()).thenReturn(mockLayerInfo);
listener.handlePostModifyEvent(postModifyEvent);
// check removedStyleName was truncated
verify(mockMediator).truncateByLayerAndStyle(eq(PREFIXED_RESOURCE_NAME),