@Test
public void testSetSpatialResolution() {

    RegionMask.setSpatialResolution(SpatialResolution.DEGREE_2_00);
    try {
        final RegionMask mask = RegionMask.create("X", 0, 10, 10, 0);
        assertEquals(180, mask.getWidth());
        assertEquals(90, mask.getHeight());
        final GridDef gridDef = mask.getGridDef();
        assertNotNull(gridDef);
        assertEquals(2.0, gridDef.getResolutionX(), 1e-8);
        assertEquals(2.0, gridDef.getResolutionY(), 1e-8);
    } finally {
        // reset to default
        RegionMask.setSpatialResolution(SpatialResolution.DEGREE_5_00);
    }
}