### Question:
CookieStorage { public void storeCookieAsJson(@NotNull CookieName cookieName, @NotNull Object obj) { String objStr = marshaller.marshal(obj); storeCookie(cookieName, objStr); }  void storeCookieAsJson(@NotNull CookieName cookieName, @NotNull Object obj); @Valid Optional<T> readCookieAsJson(@NotNull CookieName cookieName, @NotNull Class<T> clazz);  }### Answer:
@Test(expected = BeanValidationException.class) public void testStoreCookieAsJson_Validation() { storage.storeCookieAsJson(CookieName.cyclop_prefs, null); }