@Test
public void should_contain_user_preferences_set() throws IOException {

    // given
    // used prefs.js in arquillian.xml with predefined user preferences
    // when
    // loaded FirefoxDriver with FirefoxOptions containing the user preferences
    //then
    List<String> prefsFile = Files.readAllLines(Paths.get("src", "test", "resources", "prefs.js"));
    List<String> expLines = prefsFile.stream()
        .filter(line -> line.startsWith("user_pref"))
        .collect(Collectors.toList());
    Path userPrefFile = Paths.get((String) driver.getCapabilities().getCapability("moz:profile"), "user.js");
    assertThat(Files.readAllLines(userPrefFile)).containsAll(expLines);
}