DefaultValueProvider extends AbstractValueProvider { @Override protected short getShort(int gridPointIndex) throws IOException { return dggFile.getGridPointData(gridPointIndex).getShort(memberIndex); } DefaultValueProvider(DggFile dggFile, int memberIndex); @Override final Area getArea(); @Override int getGridPointIndex(int seqnum);  }
@Test public void testGetShort() throws IOException { when(dggFile.getGridPointData(anyInt())).thenReturn(compoundData); when(compoundData.getShort(anyInt())).thenReturn(new Short("4")); defaultValueProvider.getShort(46); verify(dggFile, times(1)).getGridPointData(46); verify(compoundData, times(1)).getShort(anyInt()); }