format
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/proxy/branches/version-2.0-work@1554959 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/test/src/test/java/org/apache/commons/proxy2/stub/AnnotationBuilderTest.java b/test/src/test/java/org/apache/commons/proxy2/stub/AnnotationBuilderTest.java
index e84a664..5a010be 100644
--- a/test/src/test/java/org/apache/commons/proxy2/stub/AnnotationBuilderTest.java
+++ b/test/src/test/java/org/apache/commons/proxy2/stub/AnnotationBuilderTest.java
@@ -46,16 +46,17 @@
@Test
public void testStubbedAnnotation()
{
- final CustomAnnotation customAnnotation =
- AnnotationBuilder.of(CustomAnnotation.class).train(new AnnotationTrainer<CustomAnnotation>()
- {
- @Override
- protected void train(CustomAnnotation trainee)
+ final CustomAnnotation customAnnotation = AnnotationBuilder.of(CustomAnnotation.class)
+ .train(new AnnotationTrainer<CustomAnnotation>()
{
- when(trainee.someType()).thenReturn(Object.class).when(trainee.finiteValues())
- .thenReturn(FiniteValues.ONE, FiniteValues.THREE).when(trainee.annString()).thenReturn("hey");
- }
- }).build();
+ @Override
+ protected void train(CustomAnnotation trainee)
+ {
+ when(trainee.someType()).thenReturn(Object.class).when(trainee.finiteValues())
+ .thenReturn(FiniteValues.ONE, FiniteValues.THREE).when(trainee.annString())
+ .thenReturn("hey");
+ }
+ }).build();
assertEquals(CustomAnnotation.class, customAnnotation.annotationType());
assertEquals("hey", customAnnotation.annString());
@@ -66,16 +67,16 @@
@Test
public void testNestedStubbedAnnotation()
{
- final NestingAnnotation nestingAnnotation =
- AnnotationBuilder.of(NestingAnnotation.class).train(new AnnotationTrainer<NestingAnnotation>()
- {
- @Override
- protected void train(NestingAnnotation trainee)
+ final NestingAnnotation nestingAnnotation = AnnotationBuilder.of(NestingAnnotation.class)
+ .train(new AnnotationTrainer<NestingAnnotation>()
{
- when(trainee.child()).thenStub(CustomAnnotation.class).when(trainee.somethingElse())
- .thenReturn("somethingElse");
- }
- }).build();
+ @Override
+ protected void train(NestingAnnotation trainee)
+ {
+ when(trainee.child()).thenStub(CustomAnnotation.class).when(trainee.somethingElse())
+ .thenReturn("somethingElse");
+ }
+ }).build();
assertEquals("", nestingAnnotation.child().annString());
assertEquals(0, nestingAnnotation.child().finiteValues().length);
@@ -91,8 +92,9 @@
members.put("finiteValues", FiniteValues.values());
members.put("someType", Object.class);
- final CustomAnnotation customAnnotation = AnnotationBuilder.of(CustomAnnotation.class).withMembers(members).build();
-
+ final CustomAnnotation customAnnotation = AnnotationBuilder.of(CustomAnnotation.class).withMembers(members)
+ .build();
+
assertNotNull(customAnnotation);
assertEquals(CustomAnnotation.class, customAnnotation.annotationType());
assertEquals("foo", customAnnotation.annString());
@@ -103,7 +105,8 @@
@Test(expected = IllegalArgumentException.class)
public void testBadMemberMap()
{
- AnnotationBuilder.of(CustomAnnotation.class).withMembers(Collections.singletonMap("annString", Integer.valueOf(100)));
+ AnnotationBuilder.of(CustomAnnotation.class).withMembers(
+ Collections.singletonMap("annString", Integer.valueOf(100)));
}
public @interface NestingAnnotation