### Question:
DebugList extends AbstractEventList<E> { public <E> DebugList<E> createNewDebugList() { return new DebugList<>(getPublisher(), debugReadWriteLock); } DebugList(); private  DebugList(ListEventPublisher publisher, DebugReadWriteLock debugReadWriteLock); boolean isLockCheckingEnabled(); void setLockCheckingEnabled(boolean lockCheckingEnabled); Set<Thread> getSanctionedReaderThreads(); Set<Thread> getSanctionedWriterThreads(); DebugList<E> createNewDebugList(); @Override ReadWriteLock getReadWriteLock(); @Override ListEventPublisher getPublisher(); @Override E get(int index); @Override int size(); @Override boolean contains(Object object); @Override boolean containsAll(Collection<?> collection); @Override boolean equals(Object object); @Override int hashCode(); @Override int indexOf(Object object); @Override int lastIndexOf(Object object); @Override boolean isEmpty(); @Override void forEach(Consumer<? super E> action); @Override Object[] toArray(); @Override T[] toArray(T[] array); @Override String toString(); @Override boolean add(E value); @Override boolean remove(Object toRemove); @Override boolean removeIf(Predicate<? super E> filter); @Override boolean addAll(Collection<? extends E> values); @Override boolean addAll(int index, Collection<? extends E> values); @Override boolean removeAll(Collection<?> values); @Override boolean retainAll(Collection<?> values); @Override void replaceAll(UnaryOperator<E> operator); @Override void sort(Comparator<? super E> c); @Override void clear(); @Override E set(int index, E value); @Override void add(int index, E value); @Override E remove(int index); @Override void dispose();  }### Answer:
@Test public void testCreateNewDebugList() { DebugList<String> list1 = new DebugList<>(); DebugList<Integer> list2 = list1.createNewDebugList(); assertSame(list1.getPublisher(), list2.getPublisher()); assertSame(list1.getReadWriteLock(), list2.getReadWriteLock()); assertSame(list1.getReadWriteLock().readLock(), list2.getReadWriteLock().readLock()); assertSame(list1.getReadWriteLock().writeLock(), list2.getReadWriteLock().writeLock()); list1.add("James"); assertEquals(1, list1.size()); assertEquals(0, list2.size()); }