@Test
public void testGetSpace() throws Exception {

  assertEquals(0, this.spaceRepository.count());
  final Tenant d_tenant = this.createDefaultTenant();
  final Space d_space = this.createSpace(d_tenant, TEST_DEFAULT_SPACE, true);
  assertEquals(1, this.spaceRepository.count());
  // Default tenant exists
  MockHttpServletRequestBuilder opts_builder =
      options("/spaces/" + TEST_DEFAULT_SPACE)
          .header(Constants.HTTP_TENANT_HEADER, TEST_DEFAULT_TENANT);
  mockMvc.perform(opts_builder).andExpect(status().isOk());
  // Default tenant members
  MockHttpServletRequestBuilder get_builder =
      get("/spaces/" + TEST_DEFAULT_SPACE)
          .header(Constants.HTTP_TENANT_HEADER, TEST_DEFAULT_TENANT)
          .accept(MediaType.APPLICATION_JSON);
  mockMvc
      .perform(get_builder)
      .andExpect(status().isOk())
      .andExpect(content().contentType(contentType))
      .andExpect(jsonPath("$.spaceToken", is(TEST_DEFAULT_SPACE)))
      .andExpect(jsonPath("$.spaceName", is(TEST_DEFAULT_SPACE)));
}