### Question:
QueueBuilder implements SpecimenBuilder { @Override public Object create(Object request, SpecimenContext context) { if (!(request instanceof SpecimenType)) { return new NoSpecimen(); } SpecimenType specimenType = (SpecimenType) request; Class requestClass = specimenType.getRawType(); if (!Queue.class.isAssignableFrom(requestClass)) { return new NoSpecimen(); } if (!requestClass.isInterface()) { return new NoSpecimen(); } return new ArrayDeque(); }  @Override Object create(Object request, SpecimenContext context);  }### Answer:
@Test public void non_specimen_type_request_returns_no_specimen() { Object result = this.queueBuilder.create("string", null); assertEquals(new NoSpecimen(), result); }
@Test public void non_queue_specimen_type_return_no_specimen() { Object result = this.queueBuilder.create(SpecimenType.of(List.class), null); assertEquals(new NoSpecimen(), result); }
@Test public void non_interface_queue_type_returns_no_specimen() { Object result = this.queueBuilder.create(SpecimenType.of(LinkedList.class), null); assertEquals(new NoSpecimen(), result); }
@Test public void class_type_assignable_to_queue_returns_instance_of_array_deque() { Object result = this.queueBuilder.create(SpecimenType.of(Queue.class), null); assertTrue(result instanceof ArrayDeque); }