### Question:
FilePremisLogger implements PremisLogger { @Override public Model getEventsModel() { return getModel(); } FilePremisLogger(PID pid, File file, RepositoryPIDMinter pidMinter); @Override PremisEventBuilder buildEvent(PID eventPid, Resource eventType, Date date); @Override PremisEventBuilder buildEvent(Resource eventType); @Override PremisLogger writeEvents(Resource... eventResources); @Override PremisLogger createLog(InputStream contentStream); Model getModel(); @Override Model getEventsModel(); @Override void close(); @Override boolean isClosed();  }### Answer:
@Test public void testGetEventsModel() { PID agentPid1 = AgentPids.forSoftware(SoftwareAgent.depositService); Resource event1 = premis.buildEvent(null, Premis.Normalization, date) .addEventDetail("Event 1").addSoftwareAgent(agentPid1) .write(); PID agentPid2 = AgentPids.forPerson("agent2"); Resource event2 = premis.buildEvent(null, Premis.VirusCheck, date) .addEventDetail("Event 2").addAuthorizingAgent(agentPid2) .write(); Model logModel = premis.getEventsModel(); Resource logEvent1Resc = logModel.getResource(event1.getURI()); Resource logEvent2Resc = logModel.getResource(event2.getURI()); assertEquals("Normalization type not written to file", Premis.Normalization, logEvent1Resc.getProperty(RDF.type).getObject()); assertEquals("Event detail not written to file", "Event 1", logEvent1Resc.getProperty(Premis.note).getString()); Resource event1AgentExecutor = logEvent1Resc.getProperty(Premis.hasEventRelatedAgentExecutor).getResource(); assertEquals(agentPid1.getRepositoryPath(), event1AgentExecutor.getURI()); assertEquals("VirusCheck type not written to file", Premis.VirusCheck, logEvent2Resc.getProperty(RDF.type).getObject()); assertEquals("Event detail not written to file", "Event 2", logEvent2Resc.getProperty(Premis.note).getString()); Resource event2AgentAuth = logEvent2Resc.getProperty(Premis.hasEventRelatedAgentAuthorizor).getResource(); assertEquals(agentPid2.getRepositoryPath(), event2AgentAuth.getURI()); Resource objResc = logModel.getResource(pid.getRepositoryPath()); assertTrue(objResc.hasProperty(RDF.type, Premis.Representation)); assertTrue(logEvent1Resc.hasProperty(Prov.used, objResc)); assertTrue(logEvent2Resc.hasProperty(Prov.used, objResc)); }