The example plug-in is not up to date. Just write EntityRepository instead of EntityRepositoryInterface and then it works.