### Question:
FluentListImpl extends ComponentList<E> implements FluentList<E> { @Override public FluentList<E> submit() { return perform(FluentWebElement::submit, FluentWebElement::enabled, " has no element enabled. At least one element should be enabled to perform a submit."); } FluentListImpl(Class<E> componentClass, List<E> list, FluentControl control, ComponentInstantiator instantiator); @Override FluentWaitElementList await(); @Override E first(); @Override E single(); @Override E last(); @Override E get(int index); @Override E index(int index); @Override int count(); @Override boolean present(); @Override FluentList<E> now(); @Override FluentList<E> now(boolean force); @Override FluentList<E> reset(); @Override boolean loaded(); @Override FluentList<E> click(); @Override FluentList<E> doubleClick(); @Override FluentList<E> contextClick(); @Override FluentList<E> waitAndClick(); @Override FluentList<E> waitAndClick(Duration duration); @Override FluentList<E> write(String... with); @Override FluentList<E> clearAll(); @Override FluentList<E> clearAllReactInputs(); @Override void clearList(); @Override FluentListConditions each(); @Override FluentListConditions one(); @Override FluentListConditions awaitUntilEach(); @Override FluentListConditions awaitUntilOne(); @Override FluentList<E> submit(); @Override FluentList<E> find(List<WebElement> rawElements); @Override E el(WebElement rawElement); @Override FluentList<E> find(String selector, SearchFilter... filters); @Override FluentList<E> find(By locator, SearchFilter... filters); @Override FluentList<E> find(SearchFilter... filters); @Override Fill fill(); @Override FillSelect fillSelect(); @Override FluentList<E> frame(); @Override Optional<FluentList<E>> optional(); @Override FluentList<T> as(Class<T> componentClass); @Override void clear(); @Override String toString(); @Override FluentList<E> withLabel(String label); @Override FluentList<E> withLabelHint(String... labelHint); @Override FluentList<E> noHookInstance(); @Override FluentList<E> noHook(); @Override FluentList<E> withHook(Class<H> hook); @Override R noHook(Class<? extends FluentHook> hook, Function<FluentList<E>, R> function); @Override FluentList<E> restoreHooks(); @Override FluentList<E> withHook(Class<H> hook, O options); @Override FluentList<E> noHook(Class<? extends FluentHook>... hooks); @Override FluentList<E> noHookInstance(Class<? extends FluentHook>... hooks); @Override R noHook(Function<FluentList<E>, R> function); @Override FluentList<E> scrollToCenter(); @Override FluentList<E> scrollIntoView(boolean alignWithTop); @Override FluentList<E> modifyAttribute(String attributeName, String attributeValue); @Override FluentList<E> scrollIntoView(); @Override
    public FluentList<E> List; }### Answer:
@Test public void testSubmit() { when(element2.enabled()).thenReturn(true); when(element3.enabled()).thenReturn(true); list.submit(); verify(element1, never()).submit(); verify(element2).submit(); verify(element3).submit(); assertThatThrownBy(() -> emptyList.submit()).isExactlyInstanceOf(NoSuchElementException.class); when(element2.enabled()).thenReturn(false); when(element3.enabled()).thenReturn(false); assertThatThrownBy(() -> list.submit()).isExactlyInstanceOf(NoSuchElementException.class) .hasMessageContaining("has no element enabled"); }