Search in sources :

Example 1 with UInt64Value

use of com.google.protobuf.UInt64Value in project core-java by SpineEventEngine.

the class TypeConverterShould method map_uint64_to_long.

@Test
public void map_uint64_to_long() {
    final long value = 42L;
    final UInt64Value wrapped = UInt64Value.newBuilder().setValue(value).build();
    final Any packed = AnyPacker.pack(wrapped);
    final long mapped = TypeConverter.toObject(packed, Long.class);
    assertEquals(value, mapped);
}
Also used : Any(com.google.protobuf.Any) UInt64Value(com.google.protobuf.UInt64Value) Test(org.junit.Test)

Aggregations

Any (com.google.protobuf.Any)1 UInt64Value (com.google.protobuf.UInt64Value)1 Test (org.junit.Test)1