private List<Class<?>> getSharedClasses() {
        final Set<Class<?>> stroomClasses = new HashSet<>();

        try (ScanResult scanResult =
                new ClassGraph()
                        .enableClassInfo()
                        .acceptPackages(PACKAGE_NAME)
                        .rejectPackages("hadoopcommonshaded")
                        .scan()) {

            LOGGER.info("class count {}", scanResult.getAllClasses().size());

            for (ClassInfo routeClassInfo : scanResult.getAllClasses()) {
//                LOGGER.info("{}", routeClassInfo.getName());
                final String name = routeClassInfo.getName();
                if (name.contains(".shared.") &&
                        !name.contains("hadoopcommonshaded") &&
                        !name.contains("Util") &&
                        !name.contains("$") &&
                        !name.contains("_")) {
                    try {
                        final Class<?> clazz = routeClassInfo.loadClass();
                        if (!Modifier.isInterface(clazz.getModifiers()) &&
                                !Modifier.isAbstract(clazz.getModifiers()) &&
                                !RestResource.class.isAssignableFrom(clazz) &&
                                !DirectRestService.class.isAssignableFrom(clazz)) {
                            stroomClasses.add(clazz);
                        }
                    } catch (final IllegalArgumentException e) {
                        LOGGER.debug(e.getMessage(), e);
                    }
                }
            }
        }

        LOGGER.info("Shared class count {}", stroomClasses.size());

        return stroomClasses
                .stream()
                .sorted(Comparator.comparing(Class::getName))
                .collect(Collectors.toList());
    }
Test that classes that will be subject to JSON serialisation have the full complement of JSON annotations.
stroom-app/src/test/java/stroom/importexport/TestJsonSerialisation.java