@org.junit.Test public void testTestOptions() { TestOptions options = new TestOptions(); assertEquals(TestOptions.DEFAULT_TIMEOUT, options.getTimeout()); assertEquals(TestOptions.DEFAULT_USE_EVENT_LOOP, options.isUseEventLoop()); assertEquals(Collections.<ReportOptions>emptyList(), options.getReporters()); long timeout = TestUtils.randomLong(); Boolean useEventLoop = randomBoolean(); assertSame(options, options.setTimeout(timeout)); assertSame(options, options.setUseEventLoop(useEventLoop)); assertEquals(timeout, options.getTimeout()); assertEquals(useEventLoop, options.isUseEventLoop()); List<ReportOptions> reporters = new ArrayList<>(); ReportOptions reporter1 = new ReportOptions(); reporters.add(reporter1); assertSame(options, options.setReporters(reporters)); assertEquals(reporters, options.getReporters()); ReportOptions reporter2 = new ReportOptions(); assertSame(options, options.addReporter(reporter2)); assertEquals(reporters, options.getReporters()); assertEquals(2, reporters.size()); assertEquals(Arrays.asList(reporter1, reporter2), reporters); }