Add TransmitQueue unit tests
[controller.git] / opendaylight / md-sal / cds-access-client / src / test / java / org / opendaylight / controller / cluster / access / client / NoProgressExceptionTest.java
1 /*
2  * Copyright (c) 2017 Pantheon Technologies s.r.o. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.controller.cluster.access.client;
9
10 import static org.junit.Assert.assertFalse;
11 import static org.junit.Assert.assertNull;
12 import static org.junit.Assert.assertTrue;
13
14 import org.junit.Test;
15 import org.opendaylight.controller.cluster.access.concepts.RequestException;
16
17 public class NoProgressExceptionTest {
18
19     private static final RequestException OBJECT = new NoProgressException(1000000000);
20
21     @Test
22     public void isRetriable() {
23         assertFalse(OBJECT.isRetriable());
24     }
25
26     @Test
27     public void checkMessage() {
28         String message = OBJECT.getMessage();
29         assertTrue("No progress in 1 seconds".equals(message));
30         assertNull(OBJECT.getCause());
31     }
32
33 }