### Question:
ListWithAutoConstructFlag extends ArrayList<T> { public ListWithAutoConstructFlag() { super(); } ListWithAutoConstructFlag();  ListWithAutoConstructFlag(Collection<? extends T> c);  ListWithAutoConstructFlag(int initialCapacity); void setAutoConstruct(boolean autoConstruct); boolean isAutoConstruct();  }### Answer:
@Test public void testListWithAutoConstructFlag() { ListWithAutoConstructFlag<String> noArgs = new ListWithAutoConstructFlag<String>(); ListWithAutoConstructFlag<String> collect = new ListWithAutoConstructFlag<String>( new ArrayList<String>()); ListWithAutoConstructFlag<String> capacity = new ListWithAutoConstructFlag<String>(5); assertFalse(noArgs.isAutoConstruct()); assertFalse(collect.isAutoConstruct()); assertFalse(capacity.isAutoConstruct()); noArgs.setAutoConstruct(true); collect.setAutoConstruct(true); capacity.setAutoConstruct(true); assertTrue(noArgs.isAutoConstruct()); assertTrue(collect.isAutoConstruct()); assertTrue(capacity.isAutoConstruct()); }