DiskQueue extends AbstractQueue<Payload> { @Override public int size() { return getFiles().size(); } private  DiskQueue(Builder builder); @Override Iterator<Payload> iterator(); @Override int size(); @Override boolean offer(Payload payload); @Override Payload poll(); @Override Payload peek();  }
@Test public void shouldReturnTheSize() { Payload payload1 = new Payload.Builder().build(); Payload payload2 = new Payload.Builder().build(); sut.add(payload1); sut.add(payload2); assertThat(sut.size(), is(2)); }