0

Where is this print() method defined? I can't seem to figure out where the actual method is? It just seems to work like magic. I know what an interface is. I'm asking explicitly, if I run er.response().getBody().print(); then where is the print method defined for RestAssured? I haven't overridden it.

public interface ResponseBody<T extends ResponseBody<T>> extends ResponseBodyExtractionOptions {
    String print();
...
...
}

For example, I'm running:

er.response().getBody().print();

Yet none of the classes below print seem to have print defined.

Ryan G
  • 380
  • 1
  • 11

1 Answers1

1

Thanks for the stupid downvotes. In fact, you were wrong, this wasn't an interface question.

I appreciate Sotirios Delimanolis' comment, I did not know about the getClass() method.

Running this method revealed print() is defined in the String class.

Ryan G
  • 380
  • 1
  • 11