CombinedPreConverter implements PreConverter<T, D> { @Override public Result preConvertToDomain(T source, D target, String... tags) { for (PreConverter<T, D> converter : preConverters) { Result result = converter.preConvertToDomain(source, target, tags); if (PreConverter.Result.SKIP == result) { return PreConverter.Result.SKIP; } } return PreConverter.Result.CONTINUE; } CombinedPreConverter(List<PreConverter<T, D>> preConverters); @Override Result preConvertToTo(D source, T target, String... tags); @Override Result preConvertToDomain(T source, D target, String... tags);  }
@Test public void preConvertToDomain() throws Exception { CombinedPreConverter<String, Integer> combined = new CombinedPreConverter(preConverters); assertThat(combined.preConvertToDomain("zzz", 3, "bla")).isEqualTo(SKIP); verify(first).preConvertToDomain("zzz", 3, "bla"); verify(second).preConvertToDomain("zzz", 3, "bla"); verify(third, never()).preConvertToDomain("zzz", 3, "bla"); }