3 import junit.framework.TestCase;
4 import org.apidesign.apifest08.currency.CurrencyRate;
5 import org.apidesign.apifest08.currency.CurrencyRateFactory;
8 /** Write a test that works with version from task A and fails with version B.
10 public class CurrencyTest extends TestCase {
11 public CurrencyTest(String n) {
15 public void testCompatibility() throws Exception {
16 CurrencyRate rate = CurrencyRateFactory.getInstance().createCurrencyRate("CZK", "USD", 1, 2);
17 assertEquals("Implements one interface", 1, rate.getClass().getInterfaces().length);