@Test
public void testGetScaleFactor() {

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