@Test
public void shouldCopyCustomTagsToComponent() throws FieldNotFound {

    Instrument instrument1 = new Instrument();
    instrument1.set(new Symbol("EURUSD"));
    instrument1.set(new Product(Product.CURRENCY));
    instrument1.set(new SecurityType(SecurityType.FOREIGN_EXCHANGE_CONTRACT));
    instrument1.setString(12345, "ABC");
    instrument1.setInt(54321, 0xCAFE);
    assertEquals("EURUSD", instrument1.getSymbol().getValue());
    assertEquals(Product.CURRENCY, instrument1.getProduct().getValue());
    assertEquals(SecurityType.FOREIGN_EXCHANGE_CONTRACT, instrument1.getSecurityType().getValue());
    assertEquals("ABC", instrument1.getString(12345));
    assertEquals(0xCAFE, instrument1.getInt(54321));
    Instrument instrument2 = new Instrument();
    instrument1.copyTo(instrument2);
    assertEquals("EURUSD", instrument2.getSymbol().getValue());
    assertEquals(Product.CURRENCY, instrument2.getProduct().getValue());
    assertEquals(SecurityType.FOREIGN_EXCHANGE_CONTRACT, instrument2.getSecurityType().getValue());
    assertEquals("ABC", instrument2.getString(12345));
    assertEquals(0xCAFE, instrument2.getInt(54321));
}