```
object Test {
   def main(args: Array[String]) {
       val text = "str1"
       text match {
           case "str" => println("str")

           // how to match result return by 'test' methed?
           case test("str", 1) => println("str1")
        }
    }
    def test(str: String, i: Int): String = str + i
}

```

How do I match the result returned by the `test()` method? 

The test method returns a `String` - `str1`

Should I define a case class?