SphereLayerFactory { public static SphereLayer createSphereLayer(Element domElement, AVList params) { params = AbstractLayer.getLayerConfigParams(domElement, params); params = getParamsFromDocument(domElement, params); SphereLayer layer = new SphereLayer(params); return layer; } private  SphereLayerFactory(); static SphereLayer createSphereLayer(Element domElement, AVList params);  }
@Test public void testCreateFromXML() throws Exception { URL layerDefinition = getClass().getResource("innerCore.xml"); SphereLayer sphereLayer = SphereLayerFactory.createSphereLayer(XMLUtil.openDocument(layerDefinition).getDocumentElement(), null); assertEquals("Inner Core", sphereLayer.getValue(AVKeyMore.DISPLAY_NAME)); assertEquals(new Color(150,0,150), sphereLayer.getColor()); assertEquals(100, sphereLayer.getSlices()); assertEquals(150, sphereLayer.getStacks()); assertEquals(1210000, sphereLayer.getRadius(), 0.001); }