### Question:
ResultTransformer { MatchingDependencyResult transform(SupportedMD supportedMD) { return with(supportedMD).toResult(); }    }### Answer:
@Test public void test() { ResultTransformer transformer = createConsumer(); MD md = new MDImpl(new MDSiteImpl(2).set(0, 0.8), new MDElementImpl(1, 0.7)); SupportedMD result = new SupportedMD(md, 10); MatchingDependencyResult transformed = transformer.transform(result); MatchingDependency dependency = new MatchingDependency( Collections.singletonList( new ColumnMatchWithThreshold<>(new ColumnMapping<>(AB, similarityMeasure), 0.8)), new ColumnMatchWithThreshold<>(new ColumnMapping<>(AC, similarityMeasure), 0.7) ); assertThat(transformed).isEqualTo(new MatchingDependencyResult(dependency, 10)); }