@Test
public void should_save_new_asset_and_populate_its_id() throws Exception {

    Page page = aPage().build();
    Asset asset = assetService.save(page, anAsset().withName("http://mycdn.com/myasset.js").withType(JAVASCRIPT).build());
    verify(repository).updateLastUpdateAndSave(page);
    assertThat(page.getAssets()).contains(asset);
    assertThat(asset.getId()).isNotNull();
}