@Test
public void testEnhancing() {

    // given
    DesiredCapabilities capabilities = new DesiredCapabilities();
    RemoteWebDriver driver = mock(RemoteWebDriver.class);
    when(driver.getCapabilities()).thenReturn(capabilities);
    capabilities.setCapability(AugmentingEnhancer.DRONE_AUGMENTED, driver);
    capabilities.setCapability(CapabilityType.TAKES_SCREENSHOT, Boolean.TRUE);
    // when
    RemoteWebDriver enhanced = enhancer.enhance(driver, Default.class);
    // then
    assertThat(enhanced, instanceOf(DroneAugmented.class));
    assertThat(enhanced, instanceOf(TakesScreenshot.class));
    assertEquals(driver, ((DroneAugmented) enhanced).getWrapped());
}