protected <T> T testCodex(Provider<? extends Codex<T>> codexes, T value, Set<HasUuid> scanned) {
// Just smoke-test the description
assertNotNull(codexes.get().describe());
StringWriter out = new StringWriter();
SerializationContext serialization = serializationContext(out);
try {
Codex<T> codex = codexes.get();
codexes.get().write(value, serialization);
if (scanned != null) {
visitors.getWalkers().walkImmutable(codex).accept(packScanners.get(), value);
scanned.addAll(serialization.getEntities());
}
} finally {
closeContext();
}