<commit_before>package com.github.dbadia.sqrl.server;

import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;

import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.StringWriter;
import java.util.Arrays;

import javax.xml.bind.JAXBContext;
import javax.xml.bind.Marshaller;
import javax.xml.bind.Unmarshaller;

import org.junit.BeforeClass;
import org.junit.Test;

import junitx.framework.ArrayAssert;

public class SqrlConfigTest {
	private static JAXBContext jaxbContext = null;

	@BeforeClass
	public static void beforeClass() throws Exception {
		jaxbContext = JAXBContext.newInstance(SqrlConfig.class);
	}

	private static final String EXPECTED_TEST_MARSHALL = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><sqrlConfig><nutValidityInSeconds>900</nutValidityInSeconds><nutValidityInMillis>900000</nutValidityInMillis><qrCodeFileType>PNG</qrCodeFileType><sqrlPersistenceFactoryClass>com.github.dbadia.sqrl.server.data.SqrlJpaPersistenceFactory</sqrlPersistenceFactoryClass><correlatorCookieName>sqrlcorrelator</correlatorCookieName><clientAuthStateUpdaterClass>com.MyClass</clientAuthStateUpdaterClass><cleanupTaskExecInMinutes>15</cleanupTaskExecInMinutes><authSyncCheckInMillis>500</authSyncCheckInMillis><firstNutCookieName>sqrlfirstnut</firstNutCookieName></sqrlConfig>";

	/**
	 * Basic test to ensure we don't break {@link SqrlConfig} JAXB marshalling by trying to do something illegal (try
	 * marshal an interface, etc)
	 */
	@Test
	public void testMarshall() throws Exception {
		final SqrlConfig config = new SqrlConfig();
		config.setClientAuthStateUpdaterClass("com.MyClass");
		final Marshaller jaxbMarshaller = jaxbContext.createMarshaller();
		final StringWriter writer = new StringWriter();<commit_msg>Fix test case<commit_after>package com.github.dbadia.sqrl.server;

import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;

import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.StringWriter;
import java.util.Arrays;

import javax.xml.bind.JAXBContext;
import javax.xml.bind.Marshaller;
import javax.xml.bind.Unmarshaller;

import org.junit.BeforeClass;
import org.junit.Test;

import junitx.framework.ArrayAssert;

public class SqrlConfigTest {
	private static JAXBContext jaxbContext = null;

	@BeforeClass
	public static void beforeClass() throws Exception {
		jaxbContext = JAXBContext.newInstance(SqrlConfig.class);
	}

	private static final String EXPECTED_TEST_MARSHALL = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><sqrlConfig><nutValidityInSeconds>900</nutValidityInSeconds><nutValidityInMillis>900000</nutValidityInMillis><qrCodeFileType>PNG</qrCodeFileType><sqrlPersistenceFactoryClass>com.github.dbadia.sqrl.server.data.SqrlJpaPersistenceFactory</sqrlPersistenceFactoryClass><correlatorCookieName>sqrlcorrelator</correlatorCookieName><clientAuthStateUpdaterClass>com.MyClass</clientAuthStateUpdaterClass><cleanupTaskExecInMinutes>15</cleanupTaskExecInMinutes><authSyncCheckInMillis>500</authSyncCheckInMillis><firstNutCookieName>sqrlfirstnut</firstNutCookieName><cookiePath>/</cookiePath></sqrlConfig>";

	/**
	 * Basic test to ensure we don't break {@link SqrlConfig} JAXB marshalling by trying to do something illegal (try
	 * marshal an interface, etc)
	 */
	@Test
	public void testMarshall() throws Exception {
		final SqrlConfig config = new SqrlConfig();
		config.setClientAuthStateUpdaterClass("com.MyClass");
		final Marshaller jaxbMarshaller = jaxbContext.createMarshaller();
		final StringWriter writer = new StringWriter();
{'fraction_non_alphanumeric': 0.10183189655172414, 'fraction_numerical': 0.009159482758620689, 'mean_word_length': 7.655011655011655, 'pattern_counts': {'":': 0, '<': 47, '<?xml version=': 2, '>': 47, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 8}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7391048', 'n_tokens_mistral': 1170, 'n_tokens_neox': 1139, 'n_words': 199}