for (int i = 0; i < size; i++)
{
sb.append((char) ('a' + i % 26));
}
String stringValue = sb.toString();
ByteString byteStringValue = ByteString.copy(stringValue.getBytes(Data.UTF_8_CHARSET));
// Object ctor, value is String
T fixed = objectConstructor.newInstance(stringValue);
assertEquals(fixed.data(), byteStringValue);
assertSame(fixed.data(), fixed.bytes());
// Object ctor, value is ByteString
fixed = objectConstructor.newInstance(byteStringValue);
assertSame(fixed.data(), byteStringValue);
assertSame(fixed.data(), fixed.bytes());
// ByteString ctor
fixed = byteStringConstructor.newInstance(byteStringValue);
assertSame(fixed.data(), byteStringValue);
assertSame(fixed.data(), fixed.bytes());
// schema()
assertSame(fixed.schema(), schema);
// toString()
assertEquals(fixed.toString(), byteStringValue.toString());
// check for clone and copy override with correct return type
TestDataTemplateUtil.assertCloneAndCopyReturnType(fixedClass);
// test clone