public void validate(List<String> values, String type, List<String> options) {
    TypeValidation typeValidation = findByKey(type);
    for (String value : values) {
      typeValidation.validate(value, options);
    }
  }
@Test
  public void fail_on_unknown_type() {
    TypeValidation fakeTypeValidation = mock(TypeValidation.class);
    when(fakeTypeValidation.key()).thenReturn("Fake");

    try {
      TypeValidations typeValidations = new TypeValidations(newArrayList(fakeTypeValidation));
      typeValidations.validate("10", "Unknown", null);
      fail();
    } catch (Exception e) {
      assertThat(e).isInstanceOf(BadRequestException.class);
      BadRequestException badRequestException = (BadRequestException) e;
      assertThat(badRequestException.getMessage()).isEqualTo("Type 'Unknown' is not valid.");
    }
  }