    @Test
    public void rotateSimpleAtRoot() {

        final ParentReferenceFactoryImpl<String> factory = new ParentReferenceFactoryImpl<>();
        final MutableBinaryTreeNodeImpl<String> a = new MutableBinaryTreeNodeImpl<>("a");
        final MutableBinaryTreeNodeImpl<String> c = new MutableBinaryTreeNodeImpl<>("c");
        final MutableBinaryTreeNodeImpl<String> p = new MutableBinaryTreeNodeImpl<>("p", a, null);
        final MutableBinaryTreeNodeImpl<String> q = new MutableBinaryTreeNodeImpl<>("q", p, c);

        final MutableBinaryTreeImpl<String> tree = new MutableBinaryTreeImpl<>(q);

        final InPlaceRightRotator<String> rotator = new InPlaceRightRotator<>();
        rotator.rotate(factory.wrap(tree), tree.getRoot());

        assertEquals("p", tree.getRoot().getElement());
        assertEquals("a", tree.getRoot().getLeft().getElement());
        assertEquals("q", tree.getRoot().getRight().getElement());
        assertEquals("c", tree.getRoot().getRight().getRight().getElement());
    }