<commit_before>package com.nhl.link.rest.it.fixture.pojo;

import java.io.IOException;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import javax.ws.rs.core.Application;
import javax.ws.rs.core.Feature;
import javax.ws.rs.core.FeatureContext;

import org.apache.cayenne.configuration.server.ServerRuntime;
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.test.JerseyTest;
import org.glassfish.jersey.test.inmemory.InMemoryTestContainerFactory;
import org.glassfish.jersey.test.spi.TestContainerException;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;

import com.nhl.link.rest.it.fixture.pojo.model.P1;
import com.nhl.link.rest.it.fixture.pojo.model.P2;
import com.nhl.link.rest.it.fixture.pojo.model.P3;
import com.nhl.link.rest.it.fixture.pojo.model.P4;
import com.nhl.link.rest.it.fixture.pojo.model.P6;
import com.nhl.link.rest.it.fixture.resource.PojoResource;
import com.nhl.link.rest.meta.LrEntity;
import com.nhl.link.rest.meta.LrEntityBuilder;
import com.nhl.link.rest.runtime.LinkRestBuilder;

public class JerseyTestOnPojo extends JerseyTest {
	protected static ServerRuntime runtime;
	protected static List<LrEntity<?>> pojoModels;

	// using in-memory key/value "database" to store POJOs
	protected static PojoDB pojoDB;

	@BeforeClass
	public static void setUpClass() throws IOException, SQLException {

		runtime = new ServerRuntime("cayenne-linkrest-tests.xml");
		pojoModels = new ArrayList<>();
		pojoModels = Arrays.asList(LrEntityBuilder.build(P1.class), LrEntityBuilder.build(P2.class),
				LrEntityBuilder.build(P3.class), LrEntityBuilder.build(P4.class),
				LrEntityBuilder.builder(P6.class).id("stringId").build());
		pojoDB = new PojoDB();
	}

	@AfterClass
	public static void tearDownClass() throws IOException, SQLException {
		runtime.shutdown();
		runtime = null;

	}

	public JerseyTestOnPojo() throws TestContainerException {
		super(new InMemoryTestContainerFactory());
	}

	@Before
	public void resetData() {
		pojoDB.clear();
	}

	@Override
	public Application configure() {

		Feature lrFeature = new LinkRestBuilder().linkRestService(PojoLinkRestService.class).extraEntities(pojoModels)
				.build();

		Feature unitFeature = new Feature() {

			@Override
			public boolean configure(FeatureContext context) {
				context.register(PojoResource.class);
				return true;
			}
		};

		return new ResourceConfig().register(unitFeature).register(lrFeature);
	}

}
<commit_msg>removing unneeded ServerRuntime from POJO test stack<commit_after>package com.nhl.link.rest.it.fixture.pojo;

import java.io.IOException;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import javax.ws.rs.core.Application;
import javax.ws.rs.core.Feature;
import javax.ws.rs.core.FeatureContext;

import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.test.JerseyTest;
import org.glassfish.jersey.test.inmemory.InMemoryTestContainerFactory;
import org.glassfish.jersey.test.spi.TestContainerException;
import org.junit.Before;
import org.junit.BeforeClass;

import com.nhl.link.rest.it.fixture.pojo.model.P1;
import com.nhl.link.rest.it.fixture.pojo.model.P2;
import com.nhl.link.rest.it.fixture.pojo.model.P3;
import com.nhl.link.rest.it.fixture.pojo.model.P4;
import com.nhl.link.rest.it.fixture.pojo.model.P6;
import com.nhl.link.rest.it.fixture.resource.PojoResource;
import com.nhl.link.rest.meta.LrEntity;
import com.nhl.link.rest.meta.LrEntityBuilder;
import com.nhl.link.rest.runtime.LinkRestBuilder;

public class JerseyTestOnPojo extends JerseyTest {

	protected static List<LrEntity<?>> pojoModels;

	// using in-memory key/value "database" to store POJOs
	protected static PojoDB pojoDB;

	@BeforeClass
	public static void setUpClass() throws IOException, SQLException {

		pojoModels = new ArrayList<>();
		pojoModels = Arrays.asList(LrEntityBuilder.build(P1.class), LrEntityBuilder.build(P2.class),
				LrEntityBuilder.build(P3.class), LrEntityBuilder.build(P4.class),
				LrEntityBuilder.builder(P6.class).id("stringId").build());
		pojoDB = new PojoDB();
	}

	public JerseyTestOnPojo() throws TestContainerException {
		super(new InMemoryTestContainerFactory());
	}

	@Before
	public void resetData() {
		pojoDB.clear();
	}

	@Override
	public Application configure() {

		Feature lrFeature = new LinkRestBuilder().linkRestService(PojoLinkRestService.class).extraEntities(pojoModels)
				.build();

		Feature unitFeature = new Feature() {

			@Override
			public boolean configure(FeatureContext context) {
				context.register(PojoResource.class);
				return true;
			}
		};

		return new ResourceConfig().register(unitFeature).register(lrFeature);
	}

}

{'fraction_non_alphanumeric': 0.11915692821368948, 'fraction_numerical': 0.004173622704507512, 'mean_word_length': 5.200517464424321, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 1}, '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': '3403881', 'n_tokens_mistral': 1673, 'n_tokens_neox': 1587, 'n_words': 274}