@Test
public void should_change_asset_state_in_previewable_when_asset_state_is_inactive() throws Exception {

    Page page = aPage()
            .withId("page-id")
            .withName("my-page")
            .build();
    when(repository.get("page-id")).thenReturn(page);
    Asset assetSent = anAsset().withId("assetUIID").withComponentId("page-id").withName("myasset.js").build();
    assetService.changeAssetStateInPreviewable(page, "assetUIID", false);
    assertThat(page.getInactiveAssets()).isNotEmpty().contains("assetUIID");
    verify(repository).updateLastUpdateAndSave(page);
}