@Test
public void testGetNumericAttributeValue_withDefault() {

    final String attributeName = "the_attribute";
    final Variable variable = mock(Variable.class);
    final Attribute attribute = mock(Attribute.class);
    when(attribute.getNumericValue()).thenReturn(109.7);
    when(variable.findAttribute(attributeName)).thenReturn(attribute);
    final Number value = NcTools.getNumericAttributeValue(variable, attributeName, 22.8);
    assertEquals(109.7, value.doubleValue(), 1e-8);
    verify(variable, times(1)).findAttribute(attributeName);
    verify(attribute, times(1)).getNumericValue();
    verifyNoMoreInteractions(variable);
    verifyNoMoreInteractions(attribute);
}