### Question:
TokenService { public TokenInfo getToken(String id) throws TokenNotFoundException { try { return signerProxyFacade.getToken(id); } catch (CodedException e) { if (isCausedByTokenNotFound(e)) { throw new TokenNotFoundException(e); } else { throw e; } } catch (Exception other) { throw new SignerNotReachableException("get token failed", other); } } @Autowired  TokenService(SignerProxyFacade signerProxyFacade,
            PossibleActionsRuleEngine possibleActionsRuleEngine,
            AuditDataHelper auditDataHelper); List<TokenInfo> getAllTokens(); List<CertificateInfo> getSignCertificates(ClientType clientType); List<CertificateInfo> getAllCertificates(ClientType clientType); void activateToken(String id, char[] password); void deactivateToken(String id); TokenInfo getToken(String id); TokenInfo updateTokenFriendlyName(String tokenId, String friendlyName); TokenInfo getTokenForKeyId(String keyId); TokenInfoAndKeyId getTokenAndKeyIdForCertificateHash(String hash); boolean isSoftwareTokenInitialized(); TokenInitStatusInfo getSoftwareTokenInitStatus(); TokenInfoAndKeyId getTokenAndKeyIdForCertificateRequestId(String csrId); boolean hasHardwareTokens();  }### Answer:
@Test public void getToken() throws Exception { try { tokenService.getToken(TOKEN_NOT_FOUND_TOKEN_ID); } catch (TokenNotFoundException expected) { } TokenInfo tokenInfo = tokenService.getToken(GOOD_TOKEN_ID); assertEquals(GOOD_TOKEN_NAME, tokenInfo.getFriendlyName()); }