### Question:
ClientSelect implements ClientQueryClause, DeepCloneable<ClientSelect> { public ClientQueryField getField(int index) { return fields.get(index); } ClientSelect();  ClientSelect(ClientSelect source);  ClientSelect(List<ClientQueryField> fields); @Override ClientSelect deepClone(); ClientQueryField getField(int index); ClientQueryField getField(final String id); @XmlElementWrapper(name = "fields") @XmlElement(name = "field") List<ClientQueryField> getFields(); ClientSelect setFields(List<ClientQueryField> fields); @XmlElementWrapper(name = "distinctFields") @XmlElement(name = "distinctField") List<ClientQueryField> getDistinctFields(); ClientSelect setDistinctFields(List<ClientQueryField> distinctFields); @XmlElementWrapper(name = "aggregations") @XmlElement(name = "aggregation") List<ClientQueryAggregatedField> getAggregations(); ClientSelect setAggregations(List<ClientQueryAggregatedField> aggregations); @Override void accept(ClientQueryVisitor visitor); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void fieldCanBeGotByIndex() { assertEquals(FIELD, fullyConfiguredTestInstance.getField(0)); }
@Test public void fieldCanBeGotById() { assertEquals(FIELD, fullyConfiguredTestInstance.getField(FIELD_ID)); }
@Test public void fieldCanNotBeGotByNotExistingId() { assertNull(fullyConfiguredTestInstance.getField("notExistingId")); }
@Test public void exceptionWillBeThrownWhenGettingFieldByNullId() { assertThrows(IllegalArgumentException.class, new Executable() { @Override public void execute() { fullyConfiguredTestInstance.getField(null); } }); }