@Test
public void testApply() throws Exception {

    final Array sourceArray = Array.factory(new float[]{12.3f, 18.67f, 29.894f, 57.12345f});
    final Array targetArray = Array.factory(short.class, sourceArray.getShape());
    floatPercentToShort.apply(sourceArray, targetArray, null, null);
    assertEquals(1230, targetArray.getShort(0));
    assertEquals(1867, targetArray.getShort(1));
    assertEquals(2989, targetArray.getShort(2));
    assertEquals(5712, targetArray.getShort(3));
}