### Question:
SubjectSchemas implements Iterable<T> { public static <T extends SchemaInfo> SubjectSchemas<T> with(Collection<T> schemas) { return new SubjectSchemas<>(schemas); } SubjectSchemas(
            @JsonProperty("schemas") Collection<T> schemas); @Override Iterator<T> iterator(); int size(); Collection<T> getSchemas(); @JsonIgnore Map<Integer, T> getSchemasAsMap(); @JsonIgnore String getSubject(); T getSchema(int version); @JsonIgnore T getEarliestSchema(); @JsonIgnore Integer getEarliestSchemaVersion(); @JsonIgnore T getLatestSchema(); @JsonIgnore Integer getLatestSchemaVersion(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); Builder<T> toBuilder(); static Builder<T> builder(); static Builder<T> builder(SubjectSchemas<T> origin); static SubjectSchemas<T> with(Collection<T> schemas); SubjectSchemas<R> transform(Function<T, R> function);  }### Answer:
@Test(expected=Exception.class) public void testFailsOnIllegalArguments1() throws Exception { SubjectSchemas.with(null); }
@Test(expected=Exception.class) public void testFailsOnIllegalArguments2() throws Exception { SubjectSchemas.with(Collections.singletonList(null)); }
@Test(expected=Exception.class) public void testFailsOnDifferentSubjects() throws Exception { BasicSchemaInfo[] schemas = new BasicSchemaInfo[] { SchemaTestData.randomBasicSchemaInfo("subject1", 1), SchemaTestData.randomBasicSchemaInfo("subject2", 1)}; SubjectSchemas.with(Arrays.asList(schemas)); }