### Question:
NameMapperFactory { public static NameMapper createNameMapper(NameMappingStrategy strategy) { switch (requireNonNull(strategy, "strategy")) { case SIMPLE: return new VerySimpleNameMapper(); case JACKSON_DEFAULT: return new JacksonDefaultNameMapper(); case UPPER_CAMEL_CASE: return new UpperCamelCaseNameMapper(); case SNAKE_CASE: return new SnakeCaseNameMapper(); } throw new IllegalStateException("No Mapper implemented for strategy " + strategy); }  static NameMapper createNameMapper(NameMappingStrategy strategy);  }### Answer:
@Test @DisplayName("Check Factory errors when called with null") void createNameMapper() { assertThrows(NullPointerException.class, () -> NameMapperFactory.createNameMapper(null)); }