@Override
    public Optional<String> getValue(Object arg, String type) {
        if (arg.getClass().isArray()) {
            Object[] arr = (Object[]) arg;
            int index = Integer.parseInt(getKey(type));
            if (index < 0 || index >= arr.length) {
                return Optional.empty();
            }
            Object object = arr[index];
            return object == null ? Optional.empty() : Optional.of(String.valueOf(object));
        }
        return Optional.empty();
    }
@Test
    public void testValue() {
        TypeStrategy strategy = new ArrayTypeStrategy();
        String[] arr = new String[]{"foo", null};

        // normal
        Assert.assertEquals("foo", strategy.getValue(arr, "[0]").orElse(null));

        // test null
        Assert.assertNotEquals("foo", strategy.getValue(arr, "[1]").orElse(null));

        // Testing out of bounds
        Assert.assertNotEquals("foo", strategy.getValue(arr, "[2]").orElse(null));

        // Test non array
        Assert.assertNotEquals("foo", strategy.getValue("bar", "[0]").orElse(null));

        // Test does not equal
        Assert.assertNotEquals("bar", strategy.getValue(arr, "[0]").orElse(null));
    }