### Question:
FeatureDataTypeBuilder implements LayerActivationListener { public void buildDataType(GeoPackageFeatureLayer layer, DefaultDataTypeInfo dataType, String layerId) { DefaultOrderParticipantKey orderKey = new DefaultOrderParticipantKey(DefaultOrderCategory.DEFAULT_FEATURE_LAYER_FAMILY, DefaultOrderCategory.FEATURE_CATEGORY, layerId); dataType.setOrderKey(orderKey); int zOrder = myOrderManager.activateParticipant(orderKey); MapVisualizationInfo visInfo = new DefaultMapFeatureVisualizationInfo(MapVisualizationType.MIXED_ELEMENTS, true); visInfo.setZOrder(zOrder, this); dataType.setMapVisualizationInfo(visInfo); MetaDataInfo metainfo = myMetaDataInfoBuilder.buildMetaDataInfo(layer); dataType.setMetaDataInfo(metainfo); dataType.getBasicVisualizationInfo().setUsesDataElements(true); } FeatureDataTypeBuilder(DataTypeController dataTypeController, OrderManagerRegistry orderManagerRegistry,
            MapManager mapManager); void buildDataType(GeoPackageFeatureLayer layer, DefaultDataTypeInfo dataType, String layerId); @Override void layerActivated(GeoPackageDataTypeInfo layer); @Override void layerDeactivated(GeoPackageDataTypeInfo layer);  }### Answer:
@Test public void testBuildDataType() { EasyMockSupport support = new EasyMockSupport(); Toolbox toolbox = createToolbox(support); DataTypeController controller = support.createMock(DataTypeController.class); List<Map<String, Serializable>> testData = createTestData(true, true); OrderManagerRegistry orderRegistry = createOrderRegistry(support, true); MapManager mapManager = support.createMock(MapManager.class); support.replayAll(); FeatureDataTypeBuilder builder = new FeatureDataTypeBuilder(controller, orderRegistry, mapManager); GeoPackageFeatureLayer layer = new GeoPackageFeatureLayer("package", ourPackageFile, ourLayerName, testData.size()); GeoPackageDataTypeInfo expectedDataType = new GeoPackageDataTypeInfo(toolbox, layer, ourLayerId); layer.getData().addAll(testData); builder.buildDataType(layer, expectedDataType, ourLayerId); assertEquals(1000, expectedDataType.getMapVisualizationInfo().getZOrder()); assertEquals(Color.RED.getRed(), expectedDataType.getBasicVisualizationInfo().getTypeColor().getRed()); assertEquals(0, expectedDataType.getBasicVisualizationInfo().getTypeColor().getGreen()); assertEquals(0, expectedDataType.getBasicVisualizationInfo().getTypeColor().getBlue()); assertEquals(50, expectedDataType.getBasicVisualizationInfo().getTypeColor().getAlpha()); assertTrue(expectedDataType.getMapVisualizationInfo().usesVisualizationStyles()); assertTrue(expectedDataType.getBasicVisualizationInfo().usesDataElements()); assertEquals(MapVisualizationType.MIXED_ELEMENTS, expectedDataType.getMapVisualizationInfo().getVisualizationType()); support.verifyAll(); }