f4d88ec4a8f975b86c85a5441319f1245d1eaa09
[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.assertEquals;
11 import static org.junit.Assert.assertFalse;
12 import static org.junit.Assert.assertNull;
13
14 import org.opendaylight.controller.cluster.access.concepts.RequestExceptionTest;
15
16 public class DeadHistoryExceptionTest extends RequestExceptionTest<DeadHistoryException> {
17
18     private static final DeadHistoryException OBJECT = new DeadHistoryException(100);
19
20     @Override
21     protected void isRetriable() {
22         assertFalse(OBJECT.isRetriable());
23     }
24
25     @Override
26     protected void checkMessage() {
27         final String message = OBJECT.getMessage();
28         assertEquals("Histories up to 100 are accounted for", message);
29         assertNull(OBJECT.getCause());
30     }
31
32 }