@Test
public void shouldShowSyncErrorLogIfSyncFailed() throws Exception {

    String syncError = "Actual Sync Error";
    Child child = mock(Child.class);
    when(child.getSyncLog()).thenReturn(syncError);
    activity.child = child;
    activity.showSyncLog();
    assertThat(ShadowToast.getTextOfLatestToast(), equalTo("Error occurred while syncing the record with the server, please try again."));
}