Where answers come from

Some pages can ask a language model questions. Set this up once; your choice is remembered in this browser for the whole site.

Model source
Use another source instead

Smallest-to-largest weight downloads. Qwen3.5 0.8B is our starting choice for page Q&A. GPU estimates are not total RAM: leave room for the browser, context and temporary buffers. Hardware changes speed and capacity; answers still need checking.

Session-only loading avoids saving model weights, uses extra RAM and downloads again after unloading. Turn it off to save downloads. Delete-data-on-exit or private browsing may impose a much smaller storage limit than the displayed estimate.

You sign in on OpenRouter; it gives this page a key for your account.

A free account does not make every model free. Choose a model with a listed :free variant; merely adding that suffix does not create one. Check free-model availability and pricing.

Chat

AI assistant, not Shawn Hartsock. It does not speak for him.

Inspect the page excerpt

Up to 4,800 characters, not the whole site. Recent conversation turns are retained within the model’s context limit.

Ask about this page, or just say hello.

Ready when you are.

Not saved or uploaded automatically. Closing keeps this conversation in this tab; changing pages starts a new one. Model replies can be wrong.

JUnit and JPA

Originally published .

So, we have a need to test EntityManager driven classes from inside our JUnit tests. How do you set this up? Well, I for one added a testDb persistence unit to my persistence.xml file and then set up this abstract class…


package com.vifprogram.tie.test;

import javax.persistence.EntityManager;

import javax.persistence.EntityManagerFactory;

import javax.persistence.Persistence;

import org.junit.After;

import org.junit.Before;

/**

 * This testCase object works in conjunction with a test persistence unit you

 * define in your persistence.xml. It sets up an entity manager that is aware

 * of all the classes in your build path.

 *

 * Inherit from this class to build unit tests which need an entity manager.

 *

 * @author shawn

 *

 */

public abstract class EMTestCase {

 private static final String TEST_PERSISTENCE_UNIT = "testDb";

 private EntityManagerFactory emf;

 protected EntityManager em;

 public EMTestCase() {

  super();

 }

 @Before

 public void initEmfAndEm() {

     emf = Persistence.createEntityManagerFactory(TEST_PERSISTENCE_UNIT);

     em = emf.createEntityManager();

 }

 @After

 public void closeEmfAndEm() {

     em.close();

     emf.close();

 }

}

Explore the map · Browse by topic and date