@Test public void readValueShouldFailOnInvalidActionMode() { assertThatThrownBy(() -> testee.forParsing() .readValue("\"illegal\"", DispositionActionMode.class)) .isInstanceOf(IllegalStateException.class) .hasMessage("Unrecognized MDN Disposition action mode illegal. Should be one of [manual-action, automatic-action]"); }
public ObjectMapper forParsing() { return new ObjectMapper() .registerModules(jacksonModules) .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); }
ObjectMapperFactory { public ObjectMapper forParsing() { return new ObjectMapper() .registerModules(jacksonModules) .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); } }
ObjectMapperFactory { public ObjectMapper forParsing() { return new ObjectMapper() .registerModules(jacksonModules) .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); } @Inject  ObjectMapperFactory(MailboxId.Factory mailboxIdFactory, MessageId.Factory messageIdFactory); }
ObjectMapperFactory { public ObjectMapper forParsing() { return new ObjectMapper() .registerModules(jacksonModules) .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); } @Inject  ObjectMapperFactory(MailboxId.Factory mailboxIdFactory, MessageId.Factory messageIdFactory); ObjectMapper forParsing(); ObjectMapper forWriting(); }
ObjectMapperFactory { public ObjectMapper forParsing() { return new ObjectMapper() .registerModules(jacksonModules) .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); } @Inject  ObjectMapperFactory(MailboxId.Factory mailboxIdFactory, MessageId.Factory messageIdFactory); ObjectMapper forParsing(); ObjectMapper forWriting();  }