@Test public void shouldEnsureThePublicationIsOpenBeforeReadingPosition() { publication.close(); assertThat(publication.position(), is(Publication.CLOSED)); final InOrder inOrder = Mockito.inOrder(conductorLock, conductor); inOrder.verify(conductorLock).lock(); inOrder.verify(conductor).releasePublication(publication); inOrder.verify(conductorLock).unlock(); }
@Test public void shouldReportInitialPosition() { assertThat(publication.position(), is(0L)); }
@Test public void shouldEnsureThePublicationIsOpenBeforeReadingPosition() { publication.close(); assertThat(publication.position(), is(Publication.CLOSED)); }