Add setHeaders() method and test