@Test
public void testStoreStreamUpdatesExistingDocumentAndDoesNotTryToCreateNewOne() throws Exception {

    final ByteArrayInputStream input = new ByteArrayInputStream("hello".getBytes());
    final Document cmisObject = Mockito.mock(Document.class);
    makeConfigurationExisting(cmisObject);
    storage.save(input);
    verify(cmisObject).setContentStream(any(ContentStream.class), eq(true));
    verify(root, never()).createDocument(stringMap(), any(ContentStream.class), any(VersioningState.class));
}