2 * Copyright (c) 2017 Pantheon Technologies s.r.o. and others. All rights reserved.
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
8 package org.opendaylight.controller.cluster.access.commands;
10 import static org.junit.Assert.assertNull;
11 import static org.junit.Assert.assertTrue;
13 import org.opendaylight.controller.cluster.access.concepts.RequestException;
14 import org.opendaylight.controller.cluster.access.concepts.RequestExceptionTest;
16 public class UnknownHistoryExceptionTest extends RequestExceptionTest<UnknownHistoryException> {
18 private static final RequestException OBJECT = new UnknownHistoryException(100L);
19 private static final RequestException OBJECT_NULL_PARAM = new UnknownHistoryException(null);
22 protected void isRetriable() {
23 assertTrue(OBJECT.isRetriable());
27 protected void checkMessage() {
28 String message = OBJECT.getMessage();
29 assertTrue("Last known history is 100".equals(message));
30 message = OBJECT_NULL_PARAM.getMessage();
31 assertTrue("Last known history is null".equals(message));
32 assertNull(OBJECT.getCause());