@Test
public void testGetAddOffset() {

    final Variable variable = mock(Variable.class);
    final Attribute attribute = mock(Attribute.class);
    when(attribute.getNumericValue()).thenReturn(15.812);
    when(variable.findAttribute("add_offset")).thenReturn(attribute);
    assertEquals(15.812, NcTools.getAddOffset(variable), 1e-8);
    verify(variable, times(1)).findAttribute("add_offset");
    verifyNoMoreInteractions(variable);
}