### Question:
AbstractToken implements Token { @Nullable @Override public JsonObject getClaimAsJsonObject(String claimName) { return tokenBody.getJsonObject(claimName); } AbstractToken(@Nonnull DecodedJwt decodedJwt);  AbstractToken(@Nonnull String jwtToken); @Nullable @Override String getHeaderParameterAsString(@Nonnull String headerName); @Override boolean hasClaim(@Nonnull String claimName); @Override boolean hasHeaderParameter(@Nonnull String parameterName); @Nullable @Override String getClaimAsString(@Nonnull String claimName); @Nullable @Override List<String> getClaimAsStringList(@Nonnull String claimName); @Nullable @Override JsonObject getClaimAsJsonObject(String claimName); @Nullable @Override Instant getExpiration(); @Override boolean isExpired(); @Nullable @Override Instant getNotBefore(); @Override String getTokenValue(); @Override Set<String> getAudiences(); @Override boolean equals(Object o); @Override int hashCode(); @Override String getZoneId(); @Override String toString();  }### Answer:
@Test public void getJsonObject() { JsonObject externalAttributes = cut.getClaimAsJsonObject("ext_attr"); assertThat(externalAttributes.getAsString("enhancer")).isEqualTo("XSUAA"); }
@Test public void getJsonObject_claimsIsNotAnObject_throwsException() { assertThatThrownBy(() -> cut.getClaimAsJsonObject("client_id")).isInstanceOf(JsonParsingException.class); }
@Test public void getJsonObject_claimsDoesNotExist_isNull() { assertThat(cut.getClaimAsJsonObject("doesNotExist")).isNull(); }