BooleanPrimitiveDeserializer extends BooleanWrapperDeserializer { public Boolean deserialize(String value) { return isBlank(value) ? Boolean.FALSE : super.deserialize(value); } BooleanPrimitiveDeserializer(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, "sdfsdf")); }
@Test public void shouldDeserializingNullToFalse() throws Exception { assertFalse(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 shouldDeserializingNullToFalseWithCustomBooleanFormat()throws Exception { TypeDeserializer<Boolean> toTest = newToTest(); assertFalse(deserialize(toTest, null)); }