ScreenshotArgument { public List<CompareTarget> getTargets() { return targets; } protected  ScreenshotArgument(String screenshotId, List<CompareTarget> targets,
			List<DomSelector> hiddenElementSelectors); static ScreenshotArgumentBuilder builder(); static ScreenshotArgumentBuilder builder(String newScreenshotId); String getScreenshotId(); List<CompareTarget> getTargets(); List<DomSelector> getHiddenElementSelectors(); ScreenshotArgument withScreenshotId(String newScreenshotId); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }
@Test public void constructor_targets_null() throws Exception { ScreenshotArgument arg = new ScreenshotArgument("scid", null, new ArrayList<DomSelector>()); assertThat(arg.getTargets(), is(notNullValue())); assertThat(arg.getTargets().isEmpty(), is(true)); }
@Test public void constructor_targets_null_unmodifiable() throws Exception { ScreenshotArgument arg = new ScreenshotArgument("scid", null, new ArrayList<DomSelector>()); expected.expect(UnsupportedOperationException.class); arg.getTargets().add(new CompareTarget()); }
@Test public void getter_targets() throws Exception { CompareTarget[] targets = { new CompareTarget(), new CompareTarget(ScreenArea.of(SelectorType.ID, "id")) }; ScreenshotArgument arg = new ScreenshotArgument("scid", Arrays.asList(targets), null); List<CompareTarget> result = arg.getTargets(); assertArrayEquals(targets, result.toArray(new CompareTarget[result.size()])); }
@Test public void getter_targets_unmodifiable() throws Exception { CompareTarget[] targets = { new CompareTarget(), new CompareTarget(ScreenArea.of(SelectorType.ID, "id")) }; ScreenshotArgument arg = new ScreenshotArgument("scid", Arrays.asList(targets), null); expected.expect(UnsupportedOperationException.class); arg.getTargets().add(new CompareTarget()); }