regionWidgetApi.replaceAllRegionWidgetPreferences(INVALID_REGION_WIDGET_ID, LIST_WRAPPER);
}
@Test
public void createOrReplaceRegionWidgetPreference_validParams() {
RegionWidgetPreference PREFERENCE = new RegionWidgetPreference(1L, VALID_REGION_WIDGET_ID, VALID_PREFERENCE_NAME,
VALID_PREFERENCE_VALUE);
expect(regionWidgetService.saveRegionWidgetPreference(VALID_REGION_WIDGET_ID, PREFERENCE)).andReturn(PREFERENCE);
replay(regionWidgetService);
RegionWidgetPreference result = regionWidgetApi.createOrReplaceRegionWidgetPreference(VALID_REGION_WIDGET_ID,
VALID_PREFERENCE_NAME, PREFERENCE);
verify(regionWidgetService);
assertThat(result, CoreMatchers.sameInstance(PREFERENCE));
}