package io.teiler.api.endpoint;

import static spark.Spark.before;
import static spark.Spark.get;
import static spark.Spark.post;

import io.teiler.api.service.GroupService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;


@Controller
public class GroupEndpoint implements Endpoint {
    private static final Logger LOGGER = LoggerFactory.getLogger(GroupEndpoint.class);


    @Autowired
    GroupService groupService;

    @Override
    public void register() {
        before((req, res) -> LOGGER.debug("API call to '" + req.pathInfo() + "'"));

        post("/v1/group", (req, res) -> {
            return groupService.handlePost(req);
        });

        get("/v1/group", (req, res) -> {
            return groupService.handleGet(req);
        });


    }
}

@@ -484,25 +484,24 @@
 nt.class);%0A%0A
-%0A
     @Autowir
@@ -507,16 +507,24 @@
 red%0A    
+private 
 GroupSer
@@ -710,37 +710,16 @@
  res) -%3E
- %7B%0A            return
  groupSe
@@ -735,35 +735,24 @@
 dlePost(req)
-;%0A        %7D
 );%0A%0A        
@@ -785,29 +785,8 @@
 ) -%3E
- %7B%0A            return
  gro
@@ -813,23 +813,10 @@
 req)
+)
 ;
-%0A        %7D);%0A%0A
 %0A   

Make instance private, reorder lambda