RecordId variantRecordId = idGenerator.newRecordId(masterRecordId, variantProperties);
// Test string representation is what it is supposed to be
String variantRecordIdString = masterRecordId.toString() + ".dim1=dimvalue1,dim2=dimvalue2";
assertEquals(variantRecordIdString, variantRecordId.toString());
assertEquals(variantRecordId, idGenerator.fromString(variantRecordIdString));
// Test round-trip string & bytes conversion
assertEquals(variantRecordId, idGenerator.fromString(variantRecordIdString));
assertEquals(variantRecordId, idGenerator.fromBytes(variantRecordId.toBytes()));
}