BooleanWrapperDeserializer extends PrimitiveDeserializer<Boolean> { public Boolean deserialize(String value) { return isBlank(value) ? null : trueString.equals(value); } BooleanWrapperDeserializer(CRestConfig crestConfig); Boolean deserialize(String value);  }
@Test public void shouldDeserializeFalseToFalseUsingDefaultBooleanFormat() throws Exception { assertFalse(deserialize(toTest, "false")); }
@Test public void shouldDeserializeTrueToTrueUsingDefaultBooleanFormat() throws Exception { assertTrue(deserialize(toTest, "true")); }
@Test public void shouldDeserializeAnythingToFalse() throws Exception { assertFalse(deserialize(toTest, "dffsf")); }
@Test public void shouldDeserializeNullToNull() throws Exception { assertNull(deserialize(toTest, null)); }
@Test public void shouldDeserializeFalseToFalseUsingCustomBooleanFormat() throws Exception { TypeDeserializer<Boolean> toTest = newToTest(); assertFalse(deserialize(toTest, "false")); }
@Test public void shouldDeserializeTrueToFalseUsingCustomBooleanFormat() throws Exception { TypeDeserializer<Boolean> toTest = newToTest(); assertFalse(deserialize(toTest, "true")); }
@Test public void shouldDeserializeCustomTrueToTrueUsingCustomBooleanFormat() throws Exception { TypeDeserializer<Boolean> toTest = newToTest(); assertTrue(deserialize(toTest, "ffff")); }
@Test public void shouldDeserializeAnythingToFalseWithCustomBooleanFormat() throws Exception { TypeDeserializer<Boolean> toTest = newToTest(); assertFalse(deserialize(toTest, "dffsf")); }
@Test public void shouldDeserializeNullToNullWithCustomBooleanFormat() throws Exception { TypeDeserializer<Boolean> toTest = newToTest(); assertNull(deserialize(toTest, null)); }