### Question:
ConflictDetectionResultConverter { DiagnosisElement convertDiagnosisElement(int constraintId) { final TupleList expandedTupleList = getExpandedTupleList(constraintId); return new DiagnosisElement( expander.computeOriginalId(constraintId), expandedTupleList.getInvolvedParameters(), expandedTupleList.getTuples().get(0)); } ConflictDetectionResultConverter(TestModel testModel, TestModelExpander expander); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test void testConvertDiagnosisElement() { final TestModel expandedTestModel = mock(TestModel.class); when(expandedTestModel.getForbiddenTupleLists()).thenReturn(Collections.emptyList()); when(expandedTestModel.getErrorTupleLists()).thenReturn(Arrays.asList( new TupleList(10, new int[] {0}, Collections.singletonList(new int[] {2})), new TupleList(41, new int[] {0, 1}, Collections.singletonList(new int[] {0, 2})), new TupleList(51, new int[] {0, 1}, Collections.singletonList(new int[] {1, 2})))); final TestModelExpander expander = mock(TestModelExpander.class); when(expander.computeOriginalId(10)).thenReturn(1); when(expander.computeOriginalId(41)).thenReturn(4); when(expander.computeOriginalId(51)).thenReturn(5); final ConflictDetectionResultConverter converter = new ConflictDetectionResultConverter(expandedTestModel, expander); final DiagnosisElement diagnosisElement = converter.convertDiagnosisElement(10); assertTrue(diagnosisElement.getDiagnosedConstraintId() == 1 && Arrays.equals(new int[] {0,}, diagnosisElement.getInvolvedParameters()) && Arrays.equals(new int[] {2}, diagnosisElement.getConflictingValues())); }