@Test
public void should_fix_bonds_types_in_all_pages() throws Exception {

    Component labelComponent = aComponent("labelComponent").withPropertyValue("text", "constant", "").build();
    Page page = aPage().with(labelComponent).build();
    when(pageRepository.findByObjectId("labelWidget")).thenReturn(singletonList(page));
    bondsTypesFixer.fixBondsTypes("labelWidget", singletonList(
            aProperty().name("text").bond(INTERPOLATION).build()));
    assertThat(labelComponent.getPropertyValues().get("text").getType()).isEqualTo(INTERPOLATION.toJson());
    verify(pageRepository).save(page);
}