@Test
public void testNamespaceValidation_emptyDomain() throws Exception {

  ApiConfig badNamespaceEmptyDomain = configFactory.copy(config);
  badNamespaceEmptyDomain.getNamespaceConfig().setOwnerDomain("");
  badNamespaceEmptyDomain.getNamespaceConfig().setOwnerName("name");
  try {
    validator.validate(badNamespaceEmptyDomain);
    fail("Expected InvalidNamespaceException.");
  } catch (InvalidNamespaceException expected) {
  }
}