@RequiresPermissions("bankAccount:read")
    public String getOwnerOf(long anAccountId) throws AccountNotFoundException {
        assertServiceState();
        LOGGER.info("Getting owner of account " + anAccountId);

        Account a = safelyRetrieveAccountForId(anAccountId);
        return a.getOwnerName();
    }
Internal utility method that validate the internal state of this service.
samples/aspectj/src/main/java/org/apache/shiro/samples/aspectj/bank/SecureBankService.java