use of org.apache.flink.graph.drivers.transform.GraphKeyTypeTransform.LongValueToLongValueWithProperHashCode in project flink by apache.
the class GraphKeyTypeTransformTest method testFromLongValue.
// LongValue
@Test
public void testFromLongValue() throws Exception {
TranslateFunction<LongValue, LongValueWithProperHashCode> translator = new LongValueToLongValueWithProperHashCode();
Assert.assertEquals(new LongValueWithProperHashCode(0L), translator.translate(new LongValue(0), longValueWithProperHashCode));
Assert.assertEquals(new LongValueWithProperHashCode(Long.MIN_VALUE), translator.translate(new LongValue(Long.MIN_VALUE), longValueWithProperHashCode));
Assert.assertEquals(new LongValueWithProperHashCode(Long.MAX_VALUE), translator.translate(new LongValue(Long.MAX_VALUE), longValueWithProperHashCode));
}
Aggregations