### Question:
StructureImpl implements Structure { @Override public Field getField(final String fieldName) { if (fieldName == null) { throw new NullPointerException("Field name cannot be null."); } if (!hasMember(fieldName)) { throw new IllegalArgumentException("No such field: " + fieldName); } return fieldsMap.get(fieldName.toUpperCase(Locale.getDefault())); } StructureImpl(final Map<String, Field> fields); @Override Field getField(final String fieldName); @Override List<Field> getFields(); @Override DataType getType(final String fieldName); @Override boolean hasMember(final String fieldName);  }### Answer:
@Test public void testGetField() { assertThat(structure.getField(FIELD_NAME.toLowerCase())).isSameAs(FIELD); }
@Test(expected = IllegalArgumentException.class) public void testGetFieldNoSuchField() { structure.getField("NO SUCH FIELD"); }
@Test(expected = NullPointerException.class) public void testGetFieldNullName() { structure.getField(null); }