PickleEvent (TestCase testCase) { try { Field pickleEventField = testCase.getClass().getDeclaredField("pickleEvent"); pickleEventField.setAccessible(true); return (PickleEvent)pickleEventField.get(testCase); } catch (Exception ignored) { } return null; }