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