### Question:
Xsd2UmlTweakerVisitor implements Visitor { @Override public void visit(final AssociationEnd associationEnd) { throw new UnsupportedOperationException(); } Xsd2UmlTweakerVisitor(final ModelIndex model); @Override void beginPackage(final UmlPackage pkg); @Override void endPackage(final UmlPackage pkg); final List<NamespaceOwnedElement> getOwnedElements(); @Override void visit(final AssociationEnd associationEnd); @Override void visit(final Attribute attribute); @Override void visit(final ClassType classType); @Override void visit(final DataType dataType); @Override void visit(final EnumLiteral enumLiteral); @Override void visit(final EnumType enumType); @Override void visit(final Generalization generalization); @Override void visit(final Model model); @Override void visit(final Multiplicity multiplicity); @Override void visit(final Range range); @Override void visit(final TagDefinition tagDefinition); @Override void visit(final TaggedValue taggedValue);  }### Answer:
@Test(expected = UnsupportedOperationException.class) public void testVisitAssociationEnd() throws Exception { visitor.visit(Mockito.mock(AssociationEnd.class)); }
@Test(expected = UnsupportedOperationException.class) public void testVisitAttribute() throws Exception { visitor.visit(Mockito.mock(Attribute.class)); }
@Test(expected = AssertionError.class) public void testVisitClassTypeAssertion() throws Exception { ClassType classType = Mockito.mock(ClassType.class); Mockito.when(classType.isClassType()).thenReturn(true); Mockito.when(classType.isAssociation()).thenReturn(true); visitor.visit(classType); }
@Test(expected = AssertionError.class) public void testVisitAssocTypeAssertion() throws Exception { ClassType classType = Mockito.mock(ClassType.class); Mockito.when(classType.isClassType()).thenReturn(false); Mockito.when(classType.isAssociation()).thenReturn(false); visitor.visit(classType); }
@Test(expected = UnsupportedOperationException.class) public void testVisitEnumLiteral() throws Exception { visitor.visit(Mockito.mock(EnumLiteral.class)); }
@Test(expected = UnsupportedOperationException.class) public void testVisitMultiplicity() throws Exception { visitor.visit(Mockito.mock(Multiplicity.class)); }
@Test(expected = UnsupportedOperationException.class) public void testVisitRange() throws Exception { visitor.visit(Mockito.mock(Range.class)); }
@Test(expected = UnsupportedOperationException.class) public void testVisitTaggedValue() throws Exception { visitor.visit(Mockito.mock(TaggedValue.class)); }