Resets caches and applies schema updates.
protected function applySchemaUpdates() {
drupal_static_reset();
\Drupal::entityTypeManager()
->clearCachedDefinitions();
\Drupal::service('router.builder')
->rebuild();
\Drupal::service('entity.definition_update_manager')
->applyUpdates();
}