GraphService { public void deleteAll() { LOGGER.info("Delete all nodes"); Transaction tx = session.beginTransaction(); session.deleteAll(ClassNode.class); session.deleteAll(ArchitectureNode.class); tx.commit(); } GraphService();  GraphService(Session session); void close(); void saveGraph(DependencyGraph dependencyGraph); void deleteAll(); Collection<ClassNode> findByProperty(String key, Object value); Collection<ClassNode> findByFilter(Filter filter);  }
@Test public void deleteAll() { graphService.deleteAll(); verify(sessionMock).beginTransaction(); verify(sessionMock).deleteAll(ClassNode.class); verify(sessionMock).deleteAll(ArchitectureNode.class); verifyNoMoreInteractions(sessionMock); verify(txMock).commit(); }