@Test
public void throwsOnByteArrayCreationAttempt() {

    // given
    JacksonJsonLayout layout = createDefaultTestBuilder().build();
    expectedException.expect(UnsupportedOperationException.class);
    // when
    layout.toByteArray(new Log4jLogEvent());
}