### Question:
LayerConfigurer { public DataGroupInfo configureLayer(WpsProcessConfiguration configuration, WFSDataType resultType) { DataTypeInfo correspondingType = getDataType(resultType.getTypeName()); DataGroupInfo group = resultType.getParent(); if (correspondingType != null) { DataTypeInfoUtilities.copyDataTypeInfo(correspondingType, resultType, this); setLayerColor(configuration, resultType); if (group == null) { DataGroupInfo parent = correspondingType.getParent(); while (!parent.isRootNode()) { parent = parent.getParent(); } String instanceName = configuration.getInputs().get(WPSConstants.PROCESS_INSTANCE_NAME); group = new DefaultDataGroupInfo(false, myToolbox, "WPS", resultType.getTypeKey(), instanceName); ((DefaultDataGroupInfo)group).setAssistant( new DeletableDataGroupInfoAssistant(MantleToolboxUtils.getMantleToolbox(myToolbox), null, null, g -> { })); parent.addChild(group, this); } } myMantlebox.getDataTypeController().addDataType("WPS", "WPS", resultType, this); return group; } LayerConfigurer(Toolbox toolbox); DataGroupInfo configureLayer(WpsProcessConfiguration configuration, WFSDataType resultType); void setLayerColor(WpsProcessConfiguration configuration, WFSDataType resultType);  }### Answer:
@Test public void test() { EasyMockSupport support = new EasyMockSupport(); WpsProcessConfiguration configuration = createConfiguraton(); Toolbox toolbox = createToolbox(support, false); support.replayAll(); myWpsLayer = new WpsDataTypeInfo(toolbox, "wpsServer", ourTypeName, ourTypeName, ourInstanceName, new DefaultMetaDataInfo()); LayerConfigurer configurer = new LayerConfigurer(toolbox); DataGroupInfo group = configurer.configureLayer(configuration, myWpsLayer); assertEquals(java.awt.Color.RED, myWpsLayer.getBasicVisualizationInfo().getDefaultTypeColor()); assertEquals(java.awt.Color.RED, myWpsLayer.getBasicVisualizationInfo().getTypeColor()); assertEquals(String.class, myWpsLayer.getMetaDataInfo().getKeyClassType("column1")); assertEquals(MapVisualizationType.POINT_ELEMENTS, myWpsLayer.getMapVisualizationInfo().getVisualizationType()); assertEquals(myChildren.get(0), group); support.verifyAll(); }
@Test public void testSavedWps() { EasyMockSupport support = new EasyMockSupport(); WpsProcessConfiguration configuration = createConfiguraton(); Toolbox toolbox = createToolbox(support, true); support.replayAll(); myWpsLayer = new WpsDataTypeInfo(toolbox, "wpsServer", ourTypeName, ourTypeName, ourInstanceName, new DefaultMetaDataInfo()); DataGroupInfo existingGroup = new DefaultDataGroupInfo(false, null, "wps", "saved"); existingGroup.addMember(myWpsLayer, this); myWpsLayer.getParent(); LayerConfigurer configurer = new LayerConfigurer(toolbox); DataGroupInfo group = configurer.configureLayer(configuration, myWpsLayer); assertEquals(java.awt.Color.RED, myWpsLayer.getBasicVisualizationInfo().getDefaultTypeColor()); assertEquals(java.awt.Color.RED, myWpsLayer.getBasicVisualizationInfo().getTypeColor()); assertEquals(String.class, myWpsLayer.getMetaDataInfo().getKeyClassType("column1")); assertEquals(MapVisualizationType.POINT_ELEMENTS, myWpsLayer.getMapVisualizationInfo().getVisualizationType()); assertEquals(existingGroup, group); support.verifyAll(); }