package org.onap.logging.ref.slf4j;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.core.Is.is;
+import static org.hamcrest.core.IsInstanceOf.instanceOf;
+
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import org.testng.Assert;
import org.testng.annotations.Test;
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.core.Is.is;
-import static org.hamcrest.core.IsInstanceOf.instanceOf;
-
/**
* Tests for {@link ONAPLogConstants}.
*/
c.setAccessible(true);
c.newInstance();
Assert.fail("Should fail for hidden constructor.");
- }
- catch (final InvocationTargetException e) {
+ } catch (final InvocationTargetException e) {
assertThat(e.getCause(), instanceOf(UnsupportedOperationException.class));
}
}
@Test
public void testInvocationModeToString() {
- assertThat(ONAPLogConstants.InvocationMode.SYNCHRONOUS.toString(),
- is("SYNCHRONOUS"));
+ assertThat(ONAPLogConstants.InvocationMode.SYNCHRONOUS.toString(), is("SYNCHRONOUS"));
}
@Test
try {
c.getDeclaredConstructors()[0].newInstance();
Assert.fail("Should fail for hidden constructor.");
- }
- catch (final IllegalAccessException e) {
+ } catch (final IllegalAccessException e) {
}
constructor.setAccessible(true);
constructor.newInstance();
Assert.fail("Should fail even when invoked.");
- }
- catch (final InvocationTargetException e) {
+ } catch (final InvocationTargetException e) {
assertThat(e.getCause(), instanceOf(UnsupportedOperationException.class));
}
}