Routing Error uninitialized constant TestController

Thank you all. I removed the engine and now it works.

# name: test-plugin
# about: This is intended to be a feature-rich plugin for opencollective-discourse integration
# version: 1.0.0
# authors: Sudaraka Jayathilaka

    after_initialize do
      	require_dependency 'application_controller'
      
     	class ::TestController < ::ApplicationController
    	  	#This class will contain all the back end controller methods 
    	    requires_plugin 'test-plugin'
    	    require_dependency 'admin_constraint'
    	    #this will return the JSON of users in the plugin store 
    	    def list
        		render json: { name: "donut", description: "delicious!" }
    	    end
    	end

      	add_admin_route "test.title", "test"

      	Discourse::Application.routes.append do
       		get "/admin/plugins/test" => "admin/plugins#index"
       		get "/admin/plugins/test/list" => "test#list"
    	end
    end