If I understand this correctly, I can create instance of ``StubResponse`` with ``body:String`` set to != null but there is nothing that would make me set ``encoding``.

I would change this method to something like:
```java
public void setBody(final String body, final Charset encoding) {
...
}
```
because ``encoding`` has no meaning without ``body:String`` and vice versa. You might want to get rid of ``stringBody:String`` attribute also. With this change you can easily convert given String to byteArray.