@Test
public void testNamespaceValidation_emptyName() throws Exception {

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