### Question:
Archive { @Nonnull public static Archive with(@CheckForNull final List<Person> persons) { checkArgument((persons != null) && !persons.isEmpty(), "Argument 'persons' must not be null or empty."); return new AutoValue_Archive(randomUUID().toString(), persons, now()); } Archive(); abstract String uid(); abstract List<Person> archivedPersons(); abstract LocalDateTime creation(); @Nonnull static Archive with(@CheckForNull final List<Person> persons);  }### Answer:
@Test(expectedExceptions = IllegalArgumentException.class) public void testWithNullPersons() { Archive.with(null); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testWithEmptyPersons() { Archive.with(Lists.newArrayList()); }
@Test public void testWith() { final Person person = new Person(); final Archive archive = Archive.with(Lists.newArrayList(person)); assertThat(archive.uid()).isNotEmpty(); assertThat(archive.archivedPersons().get(0)).isEqualTo(person); assertThat(archive.creation()).isNotNull(); }