@Test public void testFilterToSingle() { final Map<ReferenceTarget, Entity> map = ReferentUtils.filterToSingle(referentMap, l -> l.iterator().next()); // NB: HashMultimap doesn't preserve the order of elements, so testing for exact elements may // fail. // Instead, we'll just check the type here. assertEquals(chris.getTypeName(), map.get(chrisRT).getTypeName()); assertEquals(london.getTypeName(), map.get(londonRT).getTypeName()); }
toId(rt1.getExternalId()), rt1.getExternalId(), e1.getTypeName(), e2.getValue()); final BaleenEntity be2 = toId(rt2.getExternalId()), rt2.getExternalId(), e1.getTypeName(), e2.getValue()); final BaleenEntity be3 =