@Test
public void testGetLastSpaceReferenceWhenMultipleSpaces()
{

    DocumentReference reference = new DocumentReference("wiki", Arrays.asList("space1", "space2"), "page");
    Assert.assertEquals(new SpaceReference("space2", new SpaceReference("space1", new WikiReference("wiki"))),
        reference.getLastSpaceReference());
}