### Question:
ISOAmount extends ISOComponent implements Cloneable, Externalizable { public void readExternal (ObjectInput in) throws IOException, ClassNotFoundException { fieldNumber = in.readShort (); try { setValue(in.readUTF()); } catch (ISOException e) { throw new IOException (e.getMessage()); } } ISOAmount();  ISOAmount(int fieldNumber);  ISOAmount(int fieldNumber, int currencyCode, BigDecimal amount); Object getKey(); Object getValue(); void setValue(Object obj); void setFieldNumber(int fieldNumber); @Override int getFieldNumber(); BigDecimal getAmount(); int getScale(); String getScaleAsString(); int getCurrencyCode(); String getCurrencyCodeAsString(); String getAmountAsLegacyString(); String getAmountAsString(); byte[] pack(); int unpack(byte[] b); void unpack(InputStream in); void dump(PrintStream p, String indent); void writeExternal(ObjectOutput out); void readExternal(ObjectInput in); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void testBadReadAttemptISOException() throws IOException, ClassNotFoundException { iSOAmount = new ISOAmount() { @Override public void setValue(Object obj) throws ISOException { throw new ISOException("yikes!"); } }; ObjectInput in = mock(ObjectInput.class); try { iSOAmount.readExternal(in); } catch (IOException ioe) { assertThat(ioe.getMessage(), is("yikes!")); } }