public static Object extractValue(Object object, String attributeName, boolean failOnMissingAttribute) throws Exception {
        return createGetter(object, attributeName, failOnMissingAttribute).getValue(object);
    }
@Test
    public void extractValue_whenIntermediateFieldIsInterfaceAndDoesNotContainField_thenThrowIllegalArgumentException()
            throws Exception {
        OuterObject object = new OuterObject();
        try {
            ReflectionHelper.extractValue(object, "emptyInterface.doesNotExist", true);
            fail("Non-existing field has been ignored");
        } catch (QueryException e) {
            // createGetter() method is catching everything throwable and wraps it in QueryException
            // I don't think it's the right thing to do, but I don't want to change this behaviour.
            // Hence, I have to use try/catch in this test instead of just declaring
            // IllegalArgumentException as expected exception.
            assertEquals(IllegalArgumentException.class, e.getCause().getClass());
        }
    }