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.concepts;
10 import akka.actor.ActorRef;
11 import akka.actor.ActorSystem;
12 import akka.testkit.TestProbe;
13 import com.google.common.base.MoreObjects;
14 import org.junit.Assert;
15 import org.junit.Test;
17 public abstract class AbstractRequestTest<T extends Request> {
18 private static final ActorSystem SYSTEM = ActorSystem.create("test");
19 protected static final ActorRef ACTOR_REF = TestProbe.apply(SYSTEM).ref();
21 protected abstract T object();
24 public void getReplyToTest() {}
27 public void addToStringAttributesCommonTest() {
28 final MoreObjects.ToStringHelper result = object().addToStringAttributes(MoreObjects.toStringHelper(object()));
29 Assert.assertTrue(result.toString().contains("replyTo=" + ACTOR_REF));