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.broker;
10 import static org.junit.Assert.assertNotNull;
11 import static org.junit.Assert.assertTrue;
12 import static org.mockito.Mockito.mock;
14 import org.junit.Test;
15 import org.opendaylight.mdsal.dom.api.DOMDataTreeService;
17 public class ShardedDOMDataBrokerAdapterTest {
20 public void basicTest() throws Exception {
21 DOMDataTreeService dataTreeService = mock(DOMDataTreeService.class);
22 final ShardedDOMDataBrokerAdapter shardedDOMDataBrokerAdapter =
23 new ShardedDOMDataBrokerAdapter(dataTreeService);
25 assertTrue(shardedDOMDataBrokerAdapter.getExtensions().isEmpty());
26 assertNotNull(shardedDOMDataBrokerAdapter.newWriteOnlyTransaction());
27 assertNotNull(shardedDOMDataBrokerAdapter.newReadOnlyTransaction());
28 assertNotNull(shardedDOMDataBrokerAdapter.createTransactionChain(null));