// ... public Path analyze(String command, Path currentDirectory, Scanner scanner) { String[] parts = command.split(" "); FileSystemOperations fileSystemOperations = new FileSystemOperations(); switch (parts[0]) { // ... case Constants.CATENATE: fileSystemOperations.catenate(parts[1], currentDirectory); break; // ... default: System.out.println("This command is not supported"); break; } return currentDirectory; }