import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
+import static org.opendaylight.mdsal.common.api.CommitInfo.emptyFluentFuture;
-import com.google.common.util.concurrent.Futures;
import java.util.ArrayList;
import java.util.List;
import org.junit.Before;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
-import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException;
import org.opendaylight.netconf.api.xml.XmlUtil;
import org.opendaylight.netconf.sal.connect.util.NetconfSalKeystoreService;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.keystore.rev171017.AddPrivateKeyInput;
@Test
public void testAddPrivateKey() throws Exception {
- doReturn(Futures.<Void, TransactionCommitFailedException>immediateCheckedFuture(null)).when(writeTx).submit();
+ doReturn(emptyFluentFuture()).when(writeTx).commit();
NetconfSalKeystoreService keystoreService = new NetconfSalKeystoreService(dataBroker, encryptionService);
final AddPrivateKeyInput input = getPrivateKeyInput();
@Test
public void testAddTrustedCertificate() throws Exception {
- doReturn(Futures.<Void, TransactionCommitFailedException>immediateCheckedFuture(null)).when(writeTx).submit();
+ doReturn(emptyFluentFuture()).when(writeTx).commit();
NetconfSalKeystoreService keystoreService = new NetconfSalKeystoreService(dataBroker, encryptionService);
final AddTrustedCertificateInput input = getTrustedCertificateInput();