### Question:
JdbcStore implements Store { @Override public void queueIn(String id, int offset, List<Message> messages) { Validate.notNull(id); Validate.isTrue(offset >= 0); Validate.noNullElements(messages); List<byte[]> serializedMessages = messages.stream() .map(m -> serializer.serialize(m)) .collect(toList()); inQueue.queueIn(id, offset, serializedMessages); } private  JdbcStore(String prefix, DataSource dataSource); static JdbcStore create(String prefix, DataSource dataSource); @Override void queueOut(String id, List<Message> messages); @Override List<Message> dequeueOut(String id, int offset); @Override void queueIn(String id, int offset, List<Message> messages); @Override List<Message> dequeueIn(String id); @Override void close();  }### Answer:
@Test public void mustFailIfQueueInOnNonExistingOffset() { List<Message> expected = Arrays.asList( new Message("http:id", "dst:id1", "payload1"), new Message("http:id", "dst:id2", "payload2"), new Message("http:id", "dst:id3", "payload3") ); fixture.queueIn("id", 0, expected.subList(0, 1)); expectedException.expect(IllegalStateException.class); fixture.queueIn("id", 2, expected); }