I stumbled upon this error in drupal 8 because I had my entity classname in lowercase
 

class test extends EditorialContentEntityBase {

instead of

class Test extends EditorialContentEntityBase {