From 6219de047345acf884d93fdb7b2e130db586a10d Mon Sep 17 00:00:00 2001 From: Michael Minella Date: Fri, 26 May 2017 16:49:58 -0500 Subject: [PATCH] Polish for BATCH-2613 --- .../data/builder/MongoItemWriterBuilderTests.java | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/data/builder/MongoItemWriterBuilderTests.java b/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/data/builder/MongoItemWriterBuilderTests.java index 579f72450..a8a3358d2 100644 --- a/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/data/builder/MongoItemWriterBuilderTests.java +++ b/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/data/builder/MongoItemWriterBuilderTests.java @@ -16,7 +16,7 @@ package org.springframework.batch.item.data.builder; -import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.junit.Before; @@ -44,12 +44,7 @@ public class MongoItemWriterBuilderTests { @Before public void setUp() throws Exception { MockitoAnnotations.initMocks(this); - this.items = new ArrayList() { - { - add("foo"); - add("bar"); - } - }; + this.items = Arrays.asList("foo", "bar"); } @Test @@ -65,7 +60,8 @@ public class MongoItemWriterBuilderTests { @Test public void testDelete() throws Exception { - MongoItemWriter writer = new MongoItemWriterBuilder().template(this.template).delete(true) + MongoItemWriter writer = new MongoItemWriterBuilder().template(this.template) + .delete(true) .build(); writer.write(this.items); @@ -79,7 +75,8 @@ public class MongoItemWriterBuilderTests { @Test public void testWriteToCollection() throws Exception { MongoItemWriter writer = new MongoItemWriterBuilder().collection("collection") - .template(this.template).build(); + .template(this.template) + .build(); writer.write(this.items);