public FieldInitializationReport initialize ( ) { final AccessibilityChanger changer = new AccessibilityChanger ( ) ; changer . enableAccess ( field ) ; try { return acquireFieldInstance ( ) ; } catch ( IllegalAccessException e ) { throw new MockitoException ( "Problems initializing field '" + field . getName ( ) + "' of type '" + field . getType ( ) . getSimpleName ( ) + "'" , e ) ; } finally { changer . safelyDisableAccess ( field ) ; } }
Initialize field if not initialized and return the actual instance .