private void insertIntoStore(final MoriaTicket ticket, final MoriaAuthnAttempt authnAttempt, final CachedUserData cachedUserData) {
private void insertIntoStore(final MoriaTicket ticket, final MoriaAuthnAttempt authnAttempt, final CachedUserData cachedUserData) throws MoriaStoreException {
    private void insertIntoStore(final MoriaTicket ticket, final MoriaAuthnAttempt authnAttempt, final CachedUserData cachedUserData) {        /* Validate parameters */        if (ticket == null) {            throw new IllegalArgumentException("ticket cannot be null");        }        if (authnAttempt == null && cachedUserData == null) {            throw new IllegalArgumentException("authnAttempt and cachedUserData cannot both be null.");        }        if (authnAttempt != null && cachedUserData != null) {            throw new IllegalArgumentException("Either authnAttempt or cachedUserData must be null.");        }        Fqn fqn = new Fqn(new Object[] {ticket.getTicketType(), ticket.getTicketId()});        HashMap data = new HashMap();        data.put(TICKET_TYPE_ATTRIBUTE, ticket.getTicketType());        data.put(TTL_ATTRIBUTE, ticket.getExpiryTime());        data.put(PRINCIPAL_ATTRIBUTE, ticket.getServicePrincipal());        if (authnAttempt != null) {            data.put(DATA_ATTRIBUTE, authnAttempt);        } else {            data.put(DATA_ATTRIBUTE, cachedUserData);        }        try {            store.put(fqn, data);        } catch (Exception e) {            // TODO: Handle this exception properly            throw new RuntimeException(e);        }    }