@Test
public void shouldDownloadAndSaveFormSections() throws Exception {

    FluentRequest request = Mockito.mock(FluentRequest.class);
    PowerMockito.mockStatic(FluentRequest.class);
    when(FluentRequest.http()).thenReturn(request);
    when(request.context(any(RapidFtrApplication.class))).thenReturn(request);
    when(request.path(anyString())).thenReturn(request);
    when(request.get()).thenReturn(new FluentResponse(buildResponse()));
    when(sharedPreferences.getString(FormService.FORM_SECTIONS_PREF, null)).thenReturn(jsonResponse);
    formService.downloadPublishedFormSections();
    verify(editor, times(1)).putString(eq(FormService.FORM_SECTIONS_PREF), eq(jsonResponse));
    verify(editor, times(1)).commit();
}