### Question:
SimpleGeometryReader { public GeometryType getGeometryType(String name) { Variable geometryVar = ds.findVariable(name); if (geometryVar == null) return null; if (ds.findGlobalAttribute(CF.CONVENTIONS) != null) if (CF1Convention.getVersion(ds.findGlobalAttribute(CF.CONVENTIONS).getStringValue()) >= 8) { Attribute geometryTypeAttr; String geometry_type; geometryTypeAttr = geometryVar.findAttribute(CF.GEOMETRY_TYPE); if (geometryTypeAttr == null) return null; geometry_type = geometryTypeAttr.getStringValue(); switch (geometry_type) { case CF.POLYGON: return GeometryType.POLYGON; case CF.LINE: return GeometryType.LINE; case CF.POINT: return GeometryType.POINT; default: return null; } } return null; } SimpleGeometryReader(NetcdfDataset ds); Polygon readPolygon(String name, int index); Line readLine(String name, int index); Point readPoint(String name, int index); GeometryType getGeometryType(String name);  }### Answer:
@Test public void testGetPointGeometryType() throws IOException { SimpleGeometryReader rdr = openReaderOverFile("avg_temp_3gage_5timesteps.nc"); Assert.assertEquals(GeometryType.POINT, rdr.getGeometryType("gage_avg_temp")); }
@Test public void testGetLineGeometryType() throws IOException { SimpleGeometryReader rdr = openReaderOverFile("outflow_3seg_5timesteps.nc"); Assert.assertEquals(GeometryType.LINE, rdr.getGeometryType("seg_outflow")); }
@Test public void testGetPolygonGeometryType() throws IOException { SimpleGeometryReader rdr = openReaderOverFile("hru_soil_moist_3hru_5timestep.nc"); Assert.assertEquals(GeometryType.POLYGON, rdr.getGeometryType("hru_soil_moist")); }