LayerInfo layer = mockLayer("testLayer", new String[]{}, LayerInfo.Type.RASTER);
LayerGroupInfo group = mockGroup("testGroup", layer);
when(rawCatalog.getLayers()).thenReturn(Lists.newArrayList(layer));
when(rawCatalog.getLayerGroups()).thenReturn(Lists.newArrayList(group));
GeoServerTileLayerInfoImpl layerInfo = TileLayerInfoUtil.loadOrCreate(layer, defaults);
GeoServerTileLayerInfoImpl groupInfo = TileLayerInfoUtil.loadOrCreate(group, defaults);
LegacyTileLayerInfoLoader.save(layerInfo, layer.getMetadata());
LegacyTileLayerInfoLoader.save(groupInfo, group.getMetadata());
// run layer initialization