TiffToProductMetadataConverter { static ProductData getModelTypeValueName(int modelTypeIndex) { ProductData value; if (modelTypeIndex == GeoTIFFCodes.ModelTypeProjected) { value = ProductData.createInstance("ModelTypeProjected"); } else if (modelTypeIndex == GeoTIFFCodes.ModelTypeGeographic) { value = ProductData.createInstance("ModelTypeGeographic"); } else if (modelTypeIndex == GeoTIFFCodes.ModelTypeGeocentric) { value = ProductData.createInstance("ModelTypeGeocentric"); } else { value = ProductData.createInstance("unknown"); } return value; }    }
@Test public void testGetModelTypeValueName() { ProductData modelTypeValueName = TiffToProductMetadataConverter.getModelTypeValueName(GeoTIFFCodes.ModelTypeProjected); assertNotNull(modelTypeValueName); assertEquals("ModelTypeProjected", modelTypeValueName.getElemString()); modelTypeValueName = TiffToProductMetadataConverter.getModelTypeValueName(GeoTIFFCodes.ModelTypeGeographic); assertNotNull(modelTypeValueName); assertEquals("ModelTypeGeographic", modelTypeValueName.getElemString()); modelTypeValueName = TiffToProductMetadataConverter.getModelTypeValueName(GeoTIFFCodes.ModelTypeGeocentric); assertNotNull(modelTypeValueName); assertEquals("ModelTypeGeocentric", modelTypeValueName.getElemString()); modelTypeValueName = TiffToProductMetadataConverter.getModelTypeValueName(-11); assertNotNull(modelTypeValueName); assertEquals("unknown", modelTypeValueName.getElemString()); }