public static int read(final AtomicBuffer buffer, final ErrorConsumer consumer)
    {
        return read(buffer, consumer, 0);
    }
@Test
    void shouldReadSummarisedObservation()
    {
        final ErrorConsumer consumer = mock(ErrorConsumer.class);

        final long timestampOne = 7;
        final long timestampTwo = 10;
        final RuntimeException error = new RuntimeException("Test Error");

        final StringWriter stringWriter = new StringWriter();
        error.printStackTrace(new PrintWriter(stringWriter));
        final String errorAsString = stringWriter.toString();

        when(clock.time()).thenReturn(timestampOne).thenReturn(timestampTwo);

        log.record(error);
        log.record(error);

        assertThat(ErrorLogReader.read(buffer, consumer), is(1));

        verify(consumer).accept(eq(2), eq(timestampOne), eq(timestampTwo), eq(errorAsString));
    }