### Question:
AnnotationConfiguration extends BaseConfiguration implements ConfigurationProperties { @Override public Capabilities getCapabilities() { return getConfig(() -> getCapabilitiesValue(configuration.capabilities())); } AnnotationConfiguration(Class<?> containerClass);  AnnotationConfiguration(FluentConfiguration configuration); @Override Class<? extends ConfigurationProperties> getConfigurationDefaults(); @Override String getWebDriver(); @Override String getRemoteUrl(); @Override Capabilities getCapabilities(); @Override Class<? extends ConfigurationFactory> getConfigurationFactory(); @Override DriverLifecycle getDriverLifecycle(); @Override Long getBrowserTimeout(); @Override Integer getBrowserTimeoutRetries(); @Override Boolean getDeleteCookies(); @Override String getBaseUrl(); @Override Long getPageLoadTimeout(); @Override Long getImplicitlyWait(); @Override Long getScriptTimeout(); @Override Long getAwaitAtMost(); @Override Long getAwaitPollingEvery(); @Override Boolean getEventsEnabled(); @Override String getScreenshotPath(); @Override String getHtmlDumpPath(); @Override TriggerMode getScreenshotMode(); @Override TriggerMode getHtmlDumpMode(); @Override String getCustomProperty(String propertyName);  }### Answer:
@Test public void capabilities() { Assertions.assertThat(noConfiguration.getCapabilities()).isNull(); Assertions.assertThat(defaultConfiguration.getCapabilities()).isNull(); DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setJavascriptEnabled(true); Assertions.assertThat(configuration.getCapabilities()).isEqualTo(capabilities); }
@Test public void desiredCapabilities() { DesiredCapabilities capabilities = DesiredCapabilities.firefox(); Assertions.assertThat(desiredCapabilitiesConfiguration.getCapabilities()).isEqualTo(capabilities); DesiredCapabilities differentCapabilities = DesiredCapabilities.chrome(); Assertions.assertThat(desiredCapabilitiesConfiguration.getCapabilities()).isNotEqualTo(differentCapabilities); }
@Test public void capabilitiesClassName() { Assertions.assertThat(capabilitiesClassNameConfiguration.getCapabilities()).isExactlyInstanceOf(TestCapabilities.class); }
@Test public void capabilitiesFactory() { Assertions.assertThat(capabilitiesFactoryConfiguration.getCapabilities()).isExactlyInstanceOf(TestCapabilities.class); }
@Test public void capabilitiesCannotBeReadFromUrl() { Assertions.assertThatThrownBy(() -> capabilitiesInvalidUrlConfiguration.getCapabilities()) .isInstanceOf(ConfigurationException.class) .hasMessage("Can't read Capabilities defined at https: }
@Test public void capabilitiesCannotBeConvertedFromJson() { Assertions.assertThatThrownBy(() -> capabilitiesInvalidJsonConfiguration.getCapabilities()) .isInstanceOf(ConfigurationException.class) .hasMessage("Can't convert JSON Capabilities to Object."); }