@Test
public void should_compute_order_while_saving_a_new_asset() throws Exception {

    Page page = aPage().build();
    Asset firstAsset = assetService.save(page, anAsset().withName("http://mycdn.com/first.js").build());
    Asset secondtAsset = assetService.save(page, anAsset().withName("http://mycdn.com/second.js").build());
    assertThat(firstAsset.getOrder()).isEqualTo(1);
    assertThat(secondtAsset.getOrder()).isEqualTo(2);
}