private static List<String> listRoute(ObjectOutputStream toServer, ObjectInputStream fromServer) throws IOException, ClassNotFoundException {
        log.debug("Start \"listRoute\" method");
        GetAllRoutesRequestInfo req = new GetAllRoutesRequestInfo();
        log.debug("Send GetAllRoutesRequestInfo to server");
        toServer.writeObject(req);

        Object o = fromServer.readObject();
        if (o instanceof RespondInfo) {
            if (((RespondInfo) o).getStatus() == RespondInfo.SERVER_ERROR_STATUS) {
                System.out.println("Server error");
                log.debug("Server error");
                return null;
            } else if (o instanceof GetAllRoutesRespondInfo) {
                GetAllRoutesRespondInfo respond = (GetAllRoutesRespondInfo) o;
                log.debug("Received GetAllRoutesRespondInfo from server");

                List<String> allRoutes = respond.getListAllRoutes();
                System.out.println("Routes:");
                for (String route : allRoutes) {
                    System.out.println(route);
                }
                log.debug("Get all routes");
                return allRoutes;

            }
        }
        log.error("Unknown object type");
        return null;
    }