@Override
    protected void configure() {

        // Create the required DirectoryResourceFactory implementation
        install(new FactoryModuleBuilder()
                .implement(
                    new TypeLiteral<DirectoryResource<UserGroup, APIUserGroup>>() {},
                    UserGroupDirectoryResource.class
                )
                .build(new TypeLiteral<DirectoryResourceFactory<UserGroup, APIUserGroup>>() {}));

        // Create the required DirectoryObjectResourceFactory implementation
        install(new FactoryModuleBuilder()
                .implement(
                    new TypeLiteral<DirectoryObjectResource<UserGroup, APIUserGroup>>() {},
                    UserGroupResource.class
                )
                .build(new TypeLiteral<DirectoryObjectResourceFactory<UserGroup, APIUserGroup>>() {}));

        // Bind translator for converting between UserGroup and APIUserGroup
        bind(new TypeLiteral<DirectoryObjectTranslator<UserGroup, APIUserGroup>>() {})
                .to(UserGroupObjectTranslator.class);

    }
Guice Module which configures injections required for handling UserGroup
resources via the REST API.
guacamole/src/main/java/org/apache/guacamole/rest/usergroup/UserGroupModule.java