Fix checkstyle reported by odlparent-3.0.0
[controller.git] / opendaylight / md-sal / cds-access-api / src / test / java / org / opendaylight / controller / cluster / access / concepts / UnsupportedRequestExceptionTest.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.concepts;
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 akka.actor.ActorRef;
15 import akka.actor.ActorSystem;
16 import akka.testkit.TestProbe;
17 import org.opendaylight.controller.cluster.access.commands.CreateLocalHistoryRequest;
18
19 public class UnsupportedRequestExceptionTest extends RequestExceptionTest<UnsupportedRequestException> {
20
21     private static final FrontendIdentifier FRONTEND =
22             new FrontendIdentifier(MemberName.forName("test"), FrontendIdentifierTest.ONE_FRONTEND_TYPE);
23     private static final ClientIdentifier CLIENT = new ClientIdentifier(FRONTEND, 0);
24
25     private static final LocalHistoryIdentifier LOCAL_HISTORY = new LocalHistoryIdentifier(CLIENT, 10);
26     private static final ActorSystem SYSTEM = ActorSystem.create("test");
27     private static final ActorRef ACTOR_REF = TestProbe.apply(SYSTEM).ref();
28     private static final Request<?, ?> REQUEST = new CreateLocalHistoryRequest(LOCAL_HISTORY, ACTOR_REF);
29     private static final RequestException OBJECT = new UnsupportedRequestException(REQUEST);
30
31     @Override
32     protected void isRetriable() {
33         assertFalse(OBJECT.isRetriable());
34     }
35
36     @Override
37     protected void checkMessage() {
38         final String message = OBJECT.getMessage();
39         final String checkMessage = "Unsupported request class org.opendaylight.controller"
40                 + ".cluster.access.commands.CreateLocalHistoryRequest";
41         assertTrue(checkMessage.equals(message));
42         assertNull(OBJECT.getCause());
43     }
44
45 }