@Test
public void testGetNumericAttributeValue() {

    final String attributeName = "an_attribute";
    final Variable variable = mock(Variable.class);
    final Attribute attribute = mock(Attribute.class);
    when(attribute.getNumericValue()).thenReturn(108);
    when(variable.findAttribute(attributeName)).thenReturn(attribute);
    final Number value = NcTools.getNumericAttributeValue(variable, attributeName);
    assertEquals(108, value.longValue());
    verify(variable, times(1)).findAttribute(attributeName);
    verify(attribute, times(1)).getNumericValue();
    verifyNoMoreInteractions(variable);
    verifyNoMoreInteractions(attribute);
}