### Question:
TreeTransformerImpl implements TreeTransformer { @Override public <E, N extends OpenMutableBinaryTreeNode<E, N>> void rotateInPlace(N rootParent, N rotationRoot, RotationDirection direction) { final ParentReferenceFactory<E, N> referenceFactory = rootReferenceFactoryProvider.get(rootParent); final ParentReference<N> reference = referenceFactory.wrap(rootParent); final Rotator<E, N> rotator = rotatorProvider.get(rotationRoot, direction); rotator.rotate(reference, rotationRoot); } TreeTransformerImpl(RootReferenceFactoryProvider rootReferenceFactoryProvider, RotatorProvider rotatorProvider); @Override void rotateRootInPlace(MutableBinaryTree<E, N> tree, RotationDirection direction); @Override void rotateInPlace(N rootParent, N rotationRoot, RotationDirection direction);  }### Answer:
@Test(expected = OperationNotSupportedForType.class) public void rotateInPlaceNoneFound() { final KeyMappingProvider keyMappingProvider = KeyMappingProvider.get(); final TreeTransformerImpl transformer = new TreeTransformerImpl( new RootReferenceFactoryProviderImpl(keyMappingProvider), new RotatorProviderImpl(keyMappingProvider)); transformer.rotateInPlace(rootParent, root, RotationDirection.LEFT); }
@Test public void rotateInPlaceWithMock() { final TreeTransformerImpl transformer = new TreeTransformerImpl( referenceFactoryProvider, rotatorProvider); transformer.rotateInPlace(rootParent, root, RotationDirection.LEFT); verify(referenceFactory).wrap(rootParent); verify(rotator).rotate(reference, root); }