@Test
public void throwsWhenUnableToDeserializeEnums() {

    NodeMapper mapper = new NodeMapper();
    NodeDeserializationException e = Assertions.assertThrows(
            NodeDeserializationException.class,
            () -> mapper.deserialize(Node.from("invalid"), FooEnum.class));
    assertThat(e.getMessage(), equalTo(
            "Deserialization error at (/): unable to create software.amazon.smithy.model.node.NodeMapperTest.FooEnum "
            + "from \"invalid\": Expected one of the following enum strings: [foo, Baz, BAR]"));
}