* @throws java.lang.Exception
*/
@Test
public void test04() throws IOException {
// Define a exchange rate provider with a mock
ExchangeRate exchangeRateMock = EasyMock.createMock(ExchangeRate.class);
// Define what is expected to valid the test (configure the mock object
// created above), we set that method "getRate()" can be call with any
// String parameter value for the second parameter and NULL for the
// first and will always throw a IOException
// (and thus the method result will be always NULL)
EasyMock.expect(exchangeRateMock.getRate((String) EasyMock.isNull(), (String) EasyMock.anyObject())).andThrow(new IOException());
// Initialize the mock object before to use it
EasyMock.replay(exchangeRateMock);
// Define a test object
Currency cTestObj = new Currency(2.50, null);
// Run the test using the mock as exchange rate provider