}
@Test
public void testRecordTypeInCacheDoesNotChange() throws Exception {
TypeManager typeManager = repoSetup.getTypeManager();
FieldType fieldType = typeManager.fieldTypeBuilder().name("testRecordTypeInCacheDoesNotChange", "f").create();
QName rtName = new QName("testRecordTypeInCacheDoesNotChange", "r");
RecordType recordType = typeManager.recordTypeBuilder().name(rtName).create();
Assert.assertNull(typeManager.getRecordTypeByName(rtName, null).getFieldTypeEntry(fieldType.getId()));
recordType.addFieldTypeEntry(fieldType.getId(), true);
Assert.assertNull(typeManager.getRecordTypeByName(rtName, null).getFieldTypeEntry(fieldType.getId()));