### Question:
DayOfExecutionDeserializer extends StdDeserializer<DayOfExecution> { @Override public DayOfExecution deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) { try { String date = jsonParser.getText(); return DayOfExecution.fromValue(date.replaceFirst("^0+(?!$)", "")); } catch (IOException | DateTimeParseException e) { log.error("Unsupported dayOfExecution format!"); } return null; } DayOfExecutionDeserializer(); @Override DayOfExecution deserialize(JsonParser jsonParser, DeserializationContext deserializationContext);  }### Answer:
@Test void deserialize_normal_value_success() throws IOException { when(jsonParser.getText()).thenReturn(NORMAL_DAY_OF_MONTH_NUMBER); DayOfExecution actual = dayOfExecutionDeserializer.deserialize(jsonParser, null); assertEquals(DAY_OF_MONTH_ENUM, actual); }
@Test void deserialize_value_with_zero_success() throws IOException { when(jsonParser.getText()).thenReturn(DAY_OF_MONTH_NUMBER_WITH_ZERO); DayOfExecution actual = dayOfExecutionDeserializer.deserialize(jsonParser, null); assertEquals(DAY_OF_MONTH_ENUM, actual); }
@Test void deserialize_fail_should_return_null() throws IOException { when(jsonParser.getText()).thenThrow(new IOException()); DayOfExecution actual = dayOfExecutionDeserializer.deserialize(jsonParser, null); assertNull(actual); }