### Question:
SpscChannel implements Channel<E> { @SuppressWarnings("unchecked") private SpscChannelConsumer<E> newConsumer(Object... args) { return mapper.newFlyweight(SpscChannelConsumer.class, "ChannelConsumerTemplate.java", Template.fromFile(Channel.class, "ChannelConsumerTemplate.java"), args); } SpscChannel(final ByteBuffer buffer, final int requestedCapacity, final Class<E> type); ChannelConsumer consumer(ChannelReceiver<E> receiver); ChannelProducer<E> producer(); int size(); int maximumCapacity(); @Override int requestedCapacity(); boolean isEmpty();  }### Answer:
@Test public void shouldReadAnObject() { ChannelConsumer consumer = newConsumer(); shouldWriteAnObject(); assertTrue(consumer.read()); assertEmpty(); }
@Test public void shouldNotReadFromEmptyChannel() { ChannelConsumer consumer = newConsumer(); assertEmpty(); assertFalse(consumer.read()); }
@Test public void shouldNotReadUnCommittedMessages() { ChannelConsumer consumer = newConsumer(); assertTrue(producer.claim()); Example writer = producer.currentElement(); writer.setBar(10L); assertFalse(consumer.read()); }