@Test
  public void testSetValue() {
    restValue.setValue(PAYLOAD);

    assertEquals(PAYLOAD, restValue.getValue());
    assertContains(restValue.toString(), "value.length=" + PAYLOAD.length);
  }
  @Test
  public void testSetContentType() {
    restValue.setContentType(PAYLOAD);

    assertEquals(PAYLOAD, restValue.getContentType());
    assertContains(restValue.toString(), "contentType='" + bytesToString(PAYLOAD));
  }
  @Test
  public void testToString_withText() {
    byte[] value = stringToBytes("foobar");
    byte[] contentType = stringToBytes("text");

    restValue = new RestValue(value, contentType);

    assertContains(restValue.toString(), "contentType='text'");
    assertContains(restValue.toString(), "value=\"foobar\"");
  }
 @Test
 public void testToString() {
   assertContains(restValue.toString(), "unknown-content-type");
   assertContains(restValue.toString(), "value.length=0");
 }