@Test
public void should_return_error_when_error_onsave() throws Exception {

    expectedException.expect(RepositoryException.class);
    Page page = aPage().build();
    doThrow(RepositoryException.class).when(repository).updateLastUpdateAndSave(page);
    assetService.save(page, anAsset().withName("http://mycdn.com/myasset.js").withType(JAVASCRIPT).build());
}