ScreenshotArgument { public ScreenshotArgument withScreenshotId(String newScreenshotId) { return new ScreenshotArgument(newScreenshotId, targets, hiddenElementSelectors); } 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 withScreenshotId() throws Exception { CompareTarget[] targets = { new CompareTarget(), new CompareTarget(ScreenArea.of(SelectorType.ID, "id")) }; DomSelector[] selectors = { new DomSelector(SelectorType.ID, "id"), new DomSelector(SelectorType.CLASS_NAME, "class") }; ScreenshotArgument arg = new ScreenshotArgument("scid", Arrays.asList(targets), Arrays.asList(selectors)); ScreenshotArgument newObj = arg.withScreenshotId("id"); assertThat(newObj, is(not(sameInstance(arg)))); assertThat(newObj.getScreenshotId(), is("id")); assertArrayEquals(targets, newObj.getTargets().toArray()); assertArrayEquals(selectors, newObj.getHiddenElementSelectors().toArray()); }