@Test
public void should_update_existing_local_asset() throws Exception {

    Asset existingAsset = anAsset().withId("existingAsset").withName("http://mycdn.com/myasset.js").withType(JAVASCRIPT).active().build();
    Asset updatedAsset = anAsset().withId("existingAsset").withName("http://mycdn.com/newName.js").withType(CSS).unactive().build();
    Page page = aPage().withAsset(existingAsset).build();
    assetService.save(page, updatedAsset);
    verify(repository).updateLastUpdateAndSave(page);
    assertThat(page.getAssets().iterator().next()).isEqualTo(updatedAsset);
}