code: public static String getReverseRoute(Class<? extends Controller> clazz) {
          String simpleName = clazz.getSimpleName();
          if (! simpleName.endsWith("Controller")) {
              throw new ControllerException("controller name must end with 'Controller' suffix");
          }
  
          String className = clazz.getName();
          if (!className.startsWith(PropertiesConstants.CONTROLLER_PACKAGE)) {
              throw new ControllerException("controller must be in the 'app.controllers' package");
          }
          String packageSuffix = className.substring(PropertiesConstants.CONTROLLER_PACKAGE.length(), className.lastIndexOf("."));
          packageSuffix = packageSuffix.replace(".", "/");
          if (packageSuffix.startsWith("/"))
              packageSuffix = packageSuffix.substring(1);
  
          return (packageSuffix.equals("") ? "" : "/" + packageSuffix) + "/" + StringUtil.underscore(simpleName.substring(0, simpleName.lastIndexOf("Controller")));
      }
docs: Generates a path to a controller based on its package and class name. The path always starts with a slash: "/".
  Examples:
  <p>
  <ul>
  <li>For class: <code>app.controllers.Simple</code> the path will be: <code>/simple</code>.</li>
  <li>For class: <code>app.controllers.admin.PeopleAdmin</code> the path will be: <code>/admin/people_admin</code>.</li>
  <li>For class: <code>app.controllers.admin.simple.PeopleAdmin</code> the path will be: <code>/admin/simple/people_admin</code>.</li>
  </ul>
  <p>
  Class name looses the "Controller" suffix and gets converted to underscore format, while packages stay unchanged.
  
  @param controllerClass class of a controller.
  @param <T> class extending {@link Controller}
  @return standard path for a controller.