### Question:
AdminApiAuthorizationFilter extends SpaceGuidBasedAuthorizationFilter { @Override protected String extractSpaceGuid(HttpServletRequest request) { String spaceGuid = applicationConfiguration.getSpaceGuid(); if (StringUtils.isEmpty(spaceGuid)) { throw new SLException("Could not retrieve the MTA deployer's space GUID."); } return spaceGuid; } @Inject  AdminApiAuthorizationFilter(ApplicationConfiguration applicationConfiguration, AuthorizationChecker authorizationChecker); @Override String getUriRegex();  }### Answer:
@Test void testExtractSpaceGuid() { Mockito.when(applicationConfiguration.getSpaceGuid()) .thenReturn(SPACE_GUID); assertEquals(SPACE_GUID, adminApiAuthorizationFilter.extractSpaceGuid(request)); }
@Test void testExtractSpaceGuidWithEmptyString() { Mockito.when(applicationConfiguration.getSpaceGuid()) .thenReturn(""); assertThrows(SLException.class, () -> adminApiAuthorizationFilter.extractSpaceGuid(request)); }