use of uk.gov.gchq.gaffer.types.FreqMap in project Gaffer by gchq.
the class FreqMapConverterTest method testConverter.
@Test
public void testConverter() throws ConversionException {
final FreqMap freqMap = new FreqMap();
freqMap.put("x", 10L);
freqMap.put("y", 5L);
freqMap.put("z", 20L);
final scala.collection.mutable.Map<String, Long> expectedResult = scala.collection.mutable.Map$.MODULE$.empty();
expectedResult.put("x", 10L);
expectedResult.put("y", 5L);
expectedResult.put("z", 20L);
assertEquals(expectedResult, FREQ_MAP_CONVERTER.convert(freqMap));
final FreqMap emptyFreqMap = new FreqMap();
expectedResult.clear();
assertEquals(expectedResult, FREQ_MAP_CONVERTER.convert(emptyFreqMap));
}
use of uk.gov.gchq.gaffer.types.FreqMap in project Gaffer by gchq.
the class FreqMapKryoSerializerTest method getTestObject.
@Override
protected FreqMap getTestObject() {
final FreqMap freqMap = new FreqMap();
freqMap.upsert("test", 3L);
return freqMap;
}
Aggregations