BooleanMatcher implements Transform<Boolean> { public String write(Boolean value) { return Boolean.TRUE.equals(value) ? trueVal : falseVal; } BooleanMatcher(String trueVal, String falseVal); Boolean read(String value); String write(Boolean value);  }
@Test public void shouldWriteTrueAsMyTrue(){ assertEquals("myTrue", toTest.write(true)); }
@Test public void shouldWriteFalseAsMyFalse(){ assertEquals("myFalse", toTest.write(false)); }
@Test public void shouldWriteNullAsMyFalse(){ assertEquals("myFalse", toTest.write(null)); }