@Test(expected = ConstraintViolationException.class) public void exceptionWhenBeanIsInvalid() { this.service.doSomething(new MyBean()); }
public void doSomething(@NotNull @Valid final MyBean bean) { System.out.println("do something"); }
MyService { public void doSomething(@NotNull @Valid final MyBean bean) { System.out.println("do something"); } }
MyService { public void doSomething(@NotNull @Valid final MyBean bean) { System.out.println("do something"); }  }
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); }
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);  }