  @Test
  public void invalidType() {

    ConfigException configException = assertThrows(ConfigException.class, ()->{
      PatternValidator validator = new PatternValidator();
      validator.ensureValid("foo", 1234);
    });

    assertTrue(configException.getMessage().contains("foo"));
  }