@Test
public void testCheckIfLoadingOfConfigurationFileIsAllowed() throws Exception {

    // run
    model.setSystemAlertWindowPermissionEnabled(true);
    model.setAccessibilityServiceEnabled(true);
    model.setReadExternalStorageEnabled(true);
    model.checkIfLoadingOfConfigurationFileIsAllowed();
    // verify
    assertTrue(model.isLoadConfigurationFileContainerVisible());
    assertTrue(model.isLoadedPackageNamesContainerVisible());
    assertFalse(model.isPermissionsHeaderVisible());
    assertFalse(model.isSystemAlertWindowContainerVisible());
    assertFalse(model.isAccessibilityServiceContainerVisible());
    assertFalse(model.isReadExternalStorageContainerVisible());
    verify(propertyChangedListener, times(1)).onPropertyChanged(MainActivityModel.PROPERTY_CONFIGURATION_FILE_ATTRIBUTES);
    verify(propertyChangedListener, times(1)).onPropertyChanged(MainActivityModel.PROPERTY_CONFIGURATION_LOADING_IN_PROGRESS);
    verify(propertyChangedListener, times(1)).onPropertyChanged(MainActivityModel.PROPERTY_ACCESSIBILITY_SERVICE_CONTAINER);
    verify(propertyChangedListener, times(1)).onPropertyChanged(MainActivityModel.PROPERTY_SYSTEM_ALERT_WINDOW_CONTAINER);
    verify(propertyChangedListener, times(1)).onPropertyChanged(MainActivityModel.PROPERTY_READ_EXTERNAL_STORAGE_CONTAINER);
}