2 * Copyright (c) 2017 Pantheon Technologies s.r.o. 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.controller.cluster.databroker;
10 import org.junit.Test;
11 import org.mockito.Mockito;
12 import org.opendaylight.controller.cluster.access.concepts.ClientIdentifier;
13 import org.opendaylight.controller.cluster.access.concepts.FrontendIdentifier;
14 import org.opendaylight.controller.cluster.access.concepts.FrontendType;
15 import org.opendaylight.controller.cluster.access.concepts.LocalHistoryIdentifier;
16 import org.opendaylight.controller.cluster.access.concepts.MemberName;
17 import org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier;
18 import org.opendaylight.controller.cluster.databroker.actors.dds.AbstractClientHandle;
20 public abstract class ClientBackedTransactionTest<T extends ClientBackedTransaction<?>> {
21 private static FrontendIdentifier FRONTEND_ID = FrontendIdentifier.create(
22 MemberName.forName("member"), FrontendType.forName("frontend"));
23 protected static final ClientIdentifier CLIENT_ID = ClientIdentifier.create(FRONTEND_ID, 0);
25 private static LocalHistoryIdentifier HISTORY_ID = new LocalHistoryIdentifier(CLIENT_ID, 0);
26 protected static final TransactionIdentifier TRANSACTION_ID = new TransactionIdentifier(HISTORY_ID, 0);
31 public void testClose() {
32 final AbstractClientHandle<?> delegate = object().delegate();
34 Mockito.verify(delegate).abort();