Ejemplo n.º 1
0
  @Test
  public void testTxCommitSuccess() {
    Iterable<Artifact> writeables = Arrays.asList(artifact1);
    List<Relation> empty = Collections.emptyList();

    when(txData.getGraph()).thenReturn(graph);
    when(txData.getAllWriteables()).thenReturn(writeables);
    when(graph.getAdjacencies(artifact1)).thenReturn(adjacencies);
    when(adjacencies.getDirties()).thenReturn(empty);

    txDataManager.txCommitSuccess(txData);
    verify(txData).setTxState(TxState.COMMITTED);
  }