@Override
    public Meta updateStatus(final Meta meta, final Status currentStatus, final Status newStatus) {
        Objects.requireNonNull(meta, "Null data");

        Meta result = metaMap.get(meta.getId());
        if (result != null) {
            if (currentStatus != result.getStatus()) {
                throw new RuntimeException("Unexpected status " +
                                           result.getStatus() +
                                           " (expected " +
                                           currentStatus +
                                           ")");
            }

            result = meta
                    .copy()
                    .status(newStatus)
                    .statusMs(System.currentTimeMillis())
                    .build();
            metaMap.put(result.getId(), result);
        }
        return result;
    }
This id is used to emulate the primary key on the database.
stroom-meta/stroom-meta-mock/src/main/java/stroom/meta/mock/MockMetaService.java