Unit tests for controller RequestException
[controller.git] / opendaylight / md-sal / cds-access-api / src / test / java / org / opendaylight / controller / cluster / access / commands / DeadHistoryExceptionTest.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.commands;
9
10 import static org.junit.Assert.assertNull;
11 import static org.junit.Assert.assertTrue;
12
13 import org.opendaylight.controller.cluster.access.concepts.RequestExceptionTest;
14
15 public class DeadHistoryExceptionTest extends RequestExceptionTest<DeadHistoryException> {
16
17     private static final DeadHistoryException OBJECT = new DeadHistoryException(100);
18
19     @Override
20     protected void isRetriable() {
21         assertTrue(OBJECT.isRetriable());
22     }
23
24     @Override
25     protected void checkMessage() {
26         final String message = OBJECT.getMessage();
27         assertTrue("Histories up to 100 are accounted for".equals(message));
28         assertNull(OBJECT.getCause());
29     }
30
31 }