### Question:
NonBlockingStack extends CommonsArrayList <ELEMENTTYPE> { @Nullable public ELEMENTTYPE firstElement () { if (isEmpty ()) throw new EmptyStackException (); return getFirst (); } NonBlockingStack();  NonBlockingStack(@Nonnegative final int nInitialCapacity); @SafeVarargs  NonBlockingStack(@Nullable final ELEMENTTYPE... aElements);  NonBlockingStack(@Nullable final Collection <? extends ELEMENTTYPE> aCollection);  NonBlockingStack(@Nullable final NonBlockingStack <? extends ELEMENTTYPE> aStack); @Nullable ELEMENTTYPE push(@Nullable final ELEMENTTYPE aItem); @Nullable ELEMENTTYPE pop(); @Nullable ELEMENTTYPE peek(); @Nullable ELEMENTTYPE top(); @Nullable ELEMENTTYPE firstElement(); @Nullable ELEMENTTYPE replaceTopElement(@Nullable final ELEMENTTYPE aItem); @Override @Nonnull NonBlockingStack <ELEMENTTYPE> getClone(); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void testCtor () { NonBlockingStack <String> st = new NonBlockingStack <> (); assertTrue (st.isEmpty ()); assertFalse (st.iterator ().hasNext ()); st = new NonBlockingStack <> ("s", "t"); assertEquals (2, st.size ()); assertEquals ("s", st.firstElement ()); assertTrue (st.iterator ().hasNext ()); st = new NonBlockingStack <> ((String []) null); assertTrue (st.isEmpty ()); assertFalse (st.iterator ().hasNext ()); st = new NonBlockingStack <> (new CommonsArrayList <> ("s", "t")); assertEquals (2, st.size ()); assertEquals ("s", st.firstElement ()); assertTrue (st.iterator ().hasNext ()); st = new NonBlockingStack <> (new CommonsHashSet <String> ()); assertTrue (st.isEmpty ()); assertFalse (st.iterator ().hasNext ()); st = new NonBlockingStack <> (new NonBlockingStack <> ("s", "t")); assertEquals (2, st.size ()); assertEquals ("s", st.firstElement ()); assertTrue (st.iterator ().hasNext ()); }