public static void setProtectedFieldValue(String protectedField, Object object, Object newValue) {
        try {
            // acgegi would silently fail to write to final fields
            // FieldUtils.writeField(Object, field, true) only sets accessible on *non* public fields
            // and then fails with IllegalAccessException (even if you make the field accessible in the interim!
            // for backwards compatability we need to use a few steps
            Field field = org.apache.commons.lang.reflect.FieldUtils.getField(object.getClass(), protectedField, true);
            field.setAccessible(true);
            field.set(object, newValue);
        } catch (Exception x) {
            throw new RuntimeException(x);
        }
    }
@Test
    public void setProtectedFieldValue_Should_Succeed() {
        InnerClassWithProtectedField sut = new InnerClassWithProtectedField();
        FieldUtils.setProtectedFieldValue("myProtectedField", sut, "test");
        assertEquals("test", sut.getMyNonFinalField());
    }