public UUID storeSecret(String userId, Secret secret) {
    // when storeSecret is called, uuid is set to the secret.
    UUID firstUUID = UUID.randomUUID();
    secret.setUuid(firstUUID);
    secret.addOwner(userId);

    map.put(secret.getUuid(), secret);
    return secret.getUuid();
  }
 public void shareSecret(String userId, UUID secretId, String targetUserId) {
   Secret s = map.get(secretId);
   s.addOwner(targetUserId);
 }