@Test
public void testTraceDictionary() {

  StaticWordValueEncoder encoder1 = new StaticWordValueEncoder("first");
  StaticWordValueEncoder encoder2 = new StaticWordValueEncoder("second");
  
  Map<String, Set<Integer>> traceDictionary = Maps.newHashMap();
  InteractionValueEncoder interactions = new InteractionValueEncoder("interactions", encoder1, encoder2);
  interactions.setProbes(1);
  interactions.setTraceDictionary(traceDictionary);
  
  Vector v = new DenseVector(10);
  interactions.addInteractionToVector("a", "b", 1, v);
  
  assertEquals(1, v.getNumNonZeroElements());
  assertEquals(1, traceDictionary.size());
  assertEquals("interactions=a:b", getFirst(traceDictionary.keySet(), null));
}