Throwing implements Scalar<T> { @Override public T value(final Field<T> field) { throw this.exception; } Throwing(final RuntimeException error); @Override T value(final Field<T> field);  }
@Test public void throwsExceptionWhenValue() { final RuntimeException rex = Mockito.mock(RuntimeException.class); this.thrown.expect(rex.getClass()); new Throwing<>(rex).value(new MkField<>(new Object(), new Object())); }