@Test
public void failsWhenMessageBodyWriterForItemEntityIsNotAvailable() throws Exception {

    ByteArrayOutputStream bOut = new ByteArrayOutputStream();
    OutputItem item1 = anOutputItem().withName("item1").withEntity("item1 entity").withMediaType(TEXT_PLAIN_TYPE).withFilename("item1.txt").build();
    thrown.expect(RuntimeException.class);
    multipartFormDataWriter.writeItems(newArrayList(item1), bOut, "1234567".getBytes());
}