@Test
public void testGetVariable_invalidVariableName() throws IOException {

    final String variableName = "schnickschnack";
    when(netcdfFile.findVariable(variableName)).thenReturn(null);
    try {
        NcTools.getVariable(netcdfFile, variableName);
        fail("IOException expected");
    } catch (IOException expected) {
    }
    verify(netcdfFile, times(1)).findVariable(variableName);
    verify(netcdfFile, times(1)).getLocation();
    verifyNoMoreInteractions(netcdfFile);
}