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