}
public void testPutGetRemove_externalIdBundle() {
final ManageableUnstructuredMarketDataSnapshot object = new ManageableUnstructuredMarketDataSnapshot();
assertTrue(object.isEmpty());
object.putValue(ExternalIdBundle.of(_eid1, _eid2), "V1", new ValueSnapshot(1d));
object.putValue(ExternalIdBundle.of(_eid2, _eid3), "V2", new ValueSnapshot(2d));
assertEquals(object.getTargets(), ImmutableSet.of(ExternalIdBundle.of(_eid1, _eid2), ExternalIdBundle.of(_eid2, _eid3)));
assertFalse(object.isEmpty());
assertEquals(object.getValue(ExternalIdBundle.of(_eid1, _eid2), "V1"), new ValueSnapshot(1d));
assertEquals(object.getValue(ExternalIdBundle.of(_eid1, _eid2), "V2"), new ValueSnapshot(2d));
assertEquals(object.getValue(_eid1, "V1"), new ValueSnapshot(1d));
assertNull(object.getValue(_eid1, "V2"));
assertEquals(object.getValue(_eid2, "V1"), new ValueSnapshot(1d));
assertEquals(object.getValue(_eid2, "V2"), new ValueSnapshot(2d));
object.putValue(ExternalIdBundle.of(_eid2, _eid3), "V1", new ValueSnapshot(3d));
assertEquals(object.getTargets(), ImmutableSet.of(ExternalIdBundle.of(_eid2, _eid3)));
assertNull(object.getValue(_eid1, "V1"));
assertNull(object.getValue(_eid1, "V2"));
assertEquals(object.getValue(_eid2, "V1"), new ValueSnapshot(3d));
assertEquals(object.getValue(_eid2, "V2"), new ValueSnapshot(2d));
assertEquals(object.getValue(_eid3, "V1"), new ValueSnapshot(3d));
assertEquals(object.getValue(_eid3, "V2"), new ValueSnapshot(2d));
final ManageableUnstructuredMarketDataSnapshot cloned = new ManageableUnstructuredMarketDataSnapshot(object);
object.removeValue(ExternalIdBundle.of(_eid2, _eid3), "V1");
assertEquals(object.getTargets(), ImmutableSet.of(ExternalIdBundle.of(_eid2, _eid3)));
assertNull(object.getValue(_eid2, "V1"));
assertEquals(object.getValue(_eid2, "V2"), new ValueSnapshot(2d));
assertNull(object.getValue(_eid3, "V1"));
assertEquals(object.getValue(_eid3, "V2"), new ValueSnapshot(2d));
object.removeValue(ExternalIdBundle.of(_eid1, _eid2), "V2");
assertEquals(object.getTargets(), Collections.emptySet());
assertTrue(object.isEmpty());
assertEquals(cloned.getValue(_eid2, "V1"), new ValueSnapshot(3d));
assertEquals(cloned.getValue(_eid2, "V2"), new ValueSnapshot(2d));
assertEquals(cloned.getValue(_eid3, "V1"), new ValueSnapshot(3d));
}