### Question:
XmiReader { protected static final void assertName(final QName name, final XMLStreamReader reader) { if (!match(name, reader)) { throw new AssertionError(reader.getLocalName()); } }  static final Model readModel(final File file); static final Model readModel(final InputStream stream); static final Model readModel(final String fileName);  }### Answer:
@Test public void testAssertElementNameEqualsStreamReadNameHappyPath() { XmiElementName xmiElementName = XmiElementName.ASSOCIATION; String elementName = xmiElementName.getLocalName(); when(mockReader.getLocalName()).thenReturn(elementName); XmiReader.assertName(xmiElementName, mockReader); }
@Test(expected = AssertionError.class) public void testAssertElementNameEqualsStreamReadNameSadPath() { XmiElementName xmiElementName = XmiElementName.ASSOCIATION; String elementName = XmiElementName.ASSOCIATION_END.getLocalName(); when(mockReader.getLocalName()).thenReturn(elementName); XmiReader.assertName(xmiElementName, mockReader); }