### Question:
AbstractComponentSwitcher implements ComponentSwitcher { @Override public final void switchToMaster() { updateDelegate( getMasterImpl() ); } protected  AbstractComponentSwitcher( DelegateInvocationHandler<T> delegate ); @Override final void switchToMaster(); @Override final void switchToSlave(); @Override final void switchToPending();  }### Answer:
@Test public void switchesToMaster() throws Throwable { DelegateInvocationHandler<Component> delegate = new DelegateInvocationHandler<>( Component.class ); TestComponentSwitcher switcher = new TestComponentSwitcher( delegate ); switcher.switchToMaster(); assertEquals( delegateClass( delegate ), MasterComponent.class ); }