private String checkAllGettersAndSetters(final Class<?> clazz) {
        final StringBuilder sb = new StringBuilder();

        final String className = clazz.getName();
        LOGGER.info(className);

        try {
            // Try and find the no args constructor if there is any.
            if (!Modifier.isInterface(clazz.getModifiers()) && !clazz.isEnum()) {
                final Set<String> fieldNames = new HashSet<>();
                final Field[] fields = clazz.getDeclaredFields();
                for (final Field field : fields) {
                    final JsonIgnore jsonIgnore = field.getDeclaredAnnotation(JsonIgnore.class);
                    if (jsonIgnore == null && !Modifier.isStatic(field.getModifiers())) {
                        final String fieldName = normaliseFieldName(field.getName());
                        fieldNames.add(fieldName);
                    }
                }

                final Set<String> getters = new HashSet<>();
                final Set<String> setters = new HashSet<>();
                final Method[] methods = clazz.getDeclaredMethods();
                for (final Method method : methods) {
                    final JsonIgnore jsonIgnore = method.getDeclaredAnnotation(JsonIgnore.class);
                    final String methodName = method.getName();
                    if (jsonIgnore == null) {
                        final boolean getter = isGetter(method);
                        final boolean setter = isSetter(method);
                        if (getter || setter) {
                            final String fieldName = convertMethodToFieldName(methodName);
                            if (setter) {
                                setters.add(fieldName);
                            } else {
                                getters.add(fieldName);
                            }
                        }
                    }
                }

                if (!getters.containsAll(fieldNames)) {
                    final Set<String> missing = new HashSet<>(fieldNames);
                    missing.removeAll(getters);
                    sb.append("\nMissing getters ");
                    sb.append(missing.toString());
                }

                if (!setters.containsAll(fieldNames)) {
                    final Set<String> missing = new HashSet<>(fieldNames);
                    missing.removeAll(setters);
                    sb.append("\nMissing setters ");
                    sb.append(missing.toString());
                }

                if (!fieldNames.containsAll(getters)) {
                    final Set<String> missing = new HashSet<>(fieldNames);
                    missing.removeAll(getters);
                    sb.append("\nOrphan fields ");
                    sb.append(missing.toString());
                }
            }
        } catch (final Exception e) {
            LOGGER.error(e.getMessage(), e);
        }

        return sb.toString().trim();
    }
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