### Question:
MyService { public void doSomething(@NotNull @Valid final MyBean bean) { System.out.println("do something"); }  void doSomething(@NotNull @Valid final MyBean bean); @Async void doSomethingAsync(@NotNull @Valid final MyBean bean);  }### Answer:
@Test(expected = ConstraintViolationException.class) public void exceptionWhenBeanIsNull() { this.service.doSomething(null); }
@Test(expected = ConstraintViolationException.class) public void exceptionWhenBeanIsInvalid() { this.service.doSomething(new MyBean()); }