### Question:
NwpTool extends BasicTool { static String getSensorBasename(String sensorName) { return sensorName.replaceAll("\\..+", ""); } NwpTool(); static void main(String[] args); @Override void initialize();  }### Answer:
@Test public void testGetSensorBasename() throws Exception { assertEquals("atsr", NwpTool.getSensorBasename("atsr.1")); assertEquals("atsr", NwpTool.getSensorBasename("atsr.2")); assertEquals("atsr", NwpTool.getSensorBasename("atsr.3")); assertEquals("avhrr", NwpTool.getSensorBasename("avhrr.n14")); assertEquals("avhrr", NwpTool.getSensorBasename("avhrr.m02")); }