title: Register @ControllerAdvice annotated Controller in JUnitTest with MockMVC
body: <p>My <code>@ControllerAdvice</code> annotated Controller looks like this:</p>
  
  <pre><code>@ControllerAdvice
  public class GlobalControllerExceptionHandler {
  
      @ResponseStatus(value = HttpStatus.UNAUTHORIZED)
      @ExceptionHandler(AuthenticationException.class)
      public void authenticationExceptionHandler() {
      }
  }
  </code></pre>
  
  <p>Of course my development is test driven and I would like to use my exception Handler in the JUnit Tests. My Test case looks like this:</p>
  
  <pre><code>public class ClientQueriesControllerTest {
  
      private MockMvc mockMvc;
  
      @InjectMocks
      private ClientQueriesController controller;
  
      @Mock
      private AuthenticationService authenticationService;
  
      @Before
      public void setup() {
          MockitoAnnotations.initMocks(this);
          mockMvc = MockMvcBuilders.standaloneSetup(controller).build();
      }
  
      @Test
      public void findAllAccountRelatedClientsUnauthorized() throws Exception {
          when(authenticationService.validateAuthorization(anyString())).thenThrow(AuthenticationException.class);
  
          mockMvc.perform(get("/rest/clients").header("Authorization", UUID.randomUUID().toString()))
                  .andExpect(status().isUnauthorized());
      }
  }
  </code></pre>
  
  <p>Probably I need to register the <code>ControllerAdvice</code> Class. How to do that?</p>