### Question:
XmiReader { protected static final <T> T assertNotNull(final T obj) { if (obj != null) { return obj; } else { throw new AssertionError(); } }  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 testAssertNotNullHappyPath() { Object o = new Object(); assertTrue(XmiReader.assertNotNull(o) == o); }
@Test(expected = AssertionError.class) public void testAssertNotNullSadPath() { XmiReader.assertNotNull(null); }
@Test public void testAllPublicMethods() throws XMLStreamException, IOException { String filename = "src/test/resources/SLI.xmi"; Model model1 = this.readModelByFile(filename); Model model2 = this.readModelByStream(filename); Model model4 = this.readModelByName(filename); assertNotNull(model1); assertNotNull(model2); assertNotNull(model4); assertEquals(model1, model2); assertEquals(model1, model4); }