BUG-8371: raise unknown history log to warn
[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 com.google.common.collect.ImmutableRangeSet;
15 import org.opendaylight.controller.cluster.access.concepts.RequestExceptionTest;
16
17 public class DeadHistoryExceptionTest extends RequestExceptionTest<DeadHistoryException> {
18
19     private static final DeadHistoryException OBJECT = new DeadHistoryException(ImmutableRangeSet.of());
20
21     @Override
22     protected void isRetriable() {
23         assertFalse(OBJECT.isRetriable());
24     }
25
26     @Override
27     protected void checkMessage() {
28         final String message = OBJECT.getMessage();
29         assertEquals("Histories [] have been purged", message);
30         assertNull(OBJECT.getCause());
31     }
32
33 }