@SuppressWarnings("unchecked")
    @Override
    public OUT[] extract(Object in) {
        OUT[] output = (OUT[]) Array.newInstance(clazz, order.length);
        for (int i = 0; i < order.length; i++) {
            output[i] = (OUT) Array.get(in, this.order[i]);
        }
        return output;
    }
@Test
    void testStringArray() {
        // check single field extraction
        for (int i = 0; i < testStringArray.length; i++) {
            String[] tmp = {testStringArray[i]};
            arrayEqualityCheck(
                    tmp, new FieldsFromArray<>(String.class, i).extract(testStringArray));
        }

        // check reverse order
        String[] reverseOrder = new String[testStringArray.length];
        for (int i = 0; i < testStringArray.length; i++) {
            reverseOrder[i] = testStringArray[testStringArray.length - i - 1];
        }
        arrayEqualityCheck(
                reverseOrder,
                new FieldsFromArray<>(String.class, 4, 3, 2, 1, 0).extract(testStringArray));

        // check picking fields and reorder
        String[] crazyOrder = {testStringArray[4], testStringArray[1], testStringArray[2]};
        arrayEqualityCheck(
                crazyOrder, new FieldsFromArray<>(String.class, 4, 1, 2).extract(testStringArray));
    }