2 * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.mdsal.dom.spi.store;
10 import static org.mockito.Mockito.doReturn;
11 import static org.mockito.Mockito.verify;
12 import static org.mockito.MockitoAnnotations.initMocks;
14 import org.junit.Test;
15 import org.mockito.Mock;
17 public class ForwardingDOMStoreThreePhaseCommitCohortTest extends ForwardingDOMStoreThreePhaseCommitCohort {
19 @Mock(name = "domStoreThreePhaseCommitCohort")
20 private DOMStoreThreePhaseCommitCohort domStoreThreePhaseCommitCohort;
23 public void basicTest() throws Exception {
26 doReturn(null).when(domStoreThreePhaseCommitCohort).canCommit();
28 verify(domStoreThreePhaseCommitCohort).canCommit();
30 doReturn(null).when(domStoreThreePhaseCommitCohort).preCommit();
32 verify(domStoreThreePhaseCommitCohort).preCommit();
34 doReturn(null).when(domStoreThreePhaseCommitCohort).commit();
36 verify(domStoreThreePhaseCommitCohort).commit();
38 doReturn(null).when(domStoreThreePhaseCommitCohort).abort();
40 verify(domStoreThreePhaseCommitCohort).abort();
44 protected DOMStoreThreePhaseCommitCohort delegate() {
45 return domStoreThreePhaseCommitCohort;