@Test
public void save() {

    graphService.saveGraph(graph);
    verify(sessionMock).beginTransaction();
    verify(sessionMock, times(graph.getAllNodes().size())).save(any(AbstractNode.class), eq(1));
    verifyNoMoreInteractions(sessionMock);
    verify(txMock).commit();
}