### Question:
ResponseQueue { boolean offer(ResponseType type, Maybe<Response> waitFor) { if (!pending.containsKey(type)) { if (waitFor instanceof MaybeSubject) { pending.put(type, (MaybeSubject<Response>) waitFor); return true; } else { return false; } } else { return false; } }    }### Answer:
@Test void allowsToStoreOnePendingResponseTypeAtTime() { ResponseQueue responseQueue = new ResponseQueue(); assertThat(responseQueue.offer(ResponseType.ACTION, MaybeSubject.create())).isTrue(); assertThat(responseQueue.offer(ResponseType.ACTION, MaybeSubject.create())).isFalse(); }