Test if the given field instance was created.
protected function assertFieldInstanceExists($entity_type, $bundle, $field_name, $field_type = 'entity_reference_revisions') {
$field = FieldConfig::loadByName($entity_type, $bundle, $field_name);
$this
->assertNotNull($field);
$this
->assertEquals($field_type, $field
->getType());
}