### Question:
AccessibilityTypeAdapterDeserializer implements TypeAdapterDeserializer<Accessibility> { @Override public Accessibility deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) { if (!json.isJsonPrimitive()) { throw new JsonParseException("Accessibility must be a JSON string"); } return Accessibility.fromValue(json.getAsString()); }  @Override Class<?> getAdaptedType(); @Override Accessibility deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context);  }### Answer:
@Test(expected = JsonParseException.class) public void testUnparsableAccessibility() { JsonObject jsonObject = new JsonObject(); jsonObject.addProperty("accessibility", "Public"); adapter.deserialize(jsonObject, Accessibility.class, null); }
@Test(expected = IllegalArgumentException.class) public void testIllegalAccessibilityValue() { JsonPrimitive jsonPrimitive = new JsonPrimitive("non-public"); adapter.deserialize(jsonPrimitive, Accessibility.class, null); }