@Test
public void testGetBasename() throws Exception {

    assertEquals("atsr", SensorNames.getBasename("atsr.1"));
    assertEquals("atsr", SensorNames.getBasename("atsr.2"));
    assertEquals("atsr", SensorNames.getBasename("atsr.3"));
    assertEquals("atsr", SensorNames.getBasename("orb_atsr.1"));
    assertEquals("atsr", SensorNames.getBasename("orb_atsr.2"));
    assertEquals("atsr", SensorNames.getBasename("orb_atsr.3"));
    assertEquals("avhrr", SensorNames.getBasename("orb_avhrr.n10"));
    assertEquals("avhrr", SensorNames.getBasename("orb_avhrr.m01"));
    assertEquals("avhrr", SensorNames.getBasename("orb_avhrr.m02"));
    assertEquals("avhrr_f", SensorNames.getBasename("orb_avhrr_f.m01"));
    assertEquals("avhrr_f", SensorNames.getBasename("orb_avhrr_f.m02"));
    assertEquals("amsr2", SensorNames.getBasename("orb_amsr2"));
    try {
        SensorNames.getBasename("orb_avhrr.m01f");
        fail();
    } catch (IllegalArgumentException expected) {
        //
    }
    try {
        SensorNames.getBasename("orb_avhrr.m02f");
        fail();
    } catch (IllegalArgumentException expected) {
        //
    }
    try {
        SensorNames.getBasename("aai");
        fail();
    } catch (IllegalArgumentException expected) {
        //
    }
    try {
        SensorNames.getBasename("seaice");
        fail();
    } catch (IllegalArgumentException expected) {
        //
    }
}