@Test(expected = RepositoryException.class)
public void should_throw_a_RepositoryException_when_saving_if_resource_is_not_found() throws Exception {

    doThrow(ResourceNotFoundException.class).when(workspaceResourceHandler).postSave(any(Path.class));
    formRepository.updateLastUpdateAndSave(aPage().withId("a_form_id").build());
}