Fixup checkstyle
[controller.git] / opendaylight / md-sal / cds-access-api / src / test / java / org / opendaylight / controller / cluster / access / commands / ClosedTransactionExceptionTest.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.junit.Assert;
15 import org.junit.Test;
16 import org.opendaylight.controller.cluster.access.concepts.RequestExceptionTest;
17
18 public class ClosedTransactionExceptionTest extends RequestExceptionTest<ClosedTransactionException> {
19
20     private static final ClosedTransactionException OBJECT = new ClosedTransactionException(true);
21
22     @Override
23     protected void isRetriable() {
24         assertFalse(OBJECT.isRetriable());
25     }
26
27     @Override
28     protected void checkMessage() {
29         final String message = OBJECT.getMessage();
30         assertEquals("Transaction has been " + "committed", message);
31         assertNull(OBJECT.getCause());
32     }
33
34     @Test
35     public void testIsSuccessful() {
36         Assert.assertEquals(true, OBJECT.isSuccessful());
37     }
38
39 }