public void shouldSerializeAndDeserializeRowKey() throws Exception {
String[] columnNames = { "foo", "bar", "baz" };
Object[] values = { 123, "Hello", 456L };
// given
SerializableRowKey key = new SerializableRowKey( new RowKey( columnNames, values ) );
// when
byte[] bytes = marshall( key );
SerializableRowKey unmarshalledKey = unmarshall( bytes );
// then
assertThat( unmarshalledKey.getClass() ).isEqualTo( SerializableRowKey.class );
assertThat( unmarshalledKey.getColumnNames() ).isEqualTo( key.getColumnNames() );
assertThat( unmarshalledKey.getColumnValues() ).isEqualTo( key.getColumnValues() );
assertTrue( key.equals( unmarshalledKey ) );
assertTrue( unmarshalledKey.equals( key ) );
assertThat( unmarshalledKey.hashCode() ).isEqualTo( key.hashCode() );
}