@Test
  public void validate_enum() {
    when(update.getUpdatedObject())
        .thenReturn(RpslObject.parse("" + "domain: 2.1.2.1.5.5.5.2.0.2.1.e164.arpa"));

    subject.validate(update, updateContext);

    verifyZeroInteractions(ipv4DomainTree, ipv6DomainTree);
  }
  @Test
  public void validate_ipv6_domain_success() {
    when(update.getUpdatedObject())
        .thenReturn(RpslObject.parse("" + "domain: 0.0.0.0.8.f.7.0.1.0.0.2.ip6.arpa"));

    subject.validate(update, updateContext);

    verify(ipv6DomainTree).findFirstLessSpecific(Ipv6Resource.parse("2001:7f8::/48"));
    verify(ipv6DomainTree).findFirstMoreSpecific(Ipv6Resource.parse("2001:7f8::/48"));

    verifyZeroInteractions(ipv4DomainTree);
  }
  @Test
  public void validate_ipv4_domain_success() {
    when(update.getUpdatedObject())
        .thenReturn(RpslObject.parse("" + "domain: 200.193.193.in-addr.arpa"));

    subject.validate(update, updateContext);

    verify(ipv4DomainTree).findFirstLessSpecific(Ipv4Resource.parse("193.193.200.0/24"));
    verify(ipv4DomainTree).findFirstMoreSpecific(Ipv4Resource.parse("193.193.200.0/24"));

    verifyZeroInteractions(ipv6DomainTree);
  }
  @Test
  public void validate_ipv4_domain_more_specific() {
    when(update.getUpdatedObject())
        .thenReturn(RpslObject.parse("" + "domain: 200.193.193.in-addr.arpa"));

    final Ipv4Resource moreSpecific = Ipv4Resource.parse("193.193.200.0/32");

    when(ipv4DomainTree.findFirstMoreSpecific(Ipv4Resource.parse("193.193.200.0/24")))
        .thenReturn(Lists.newArrayList(new Ipv4Entry(moreSpecific, 1)));

    subject.validate(update, updateContext);

    verify(updateContext)
        .addMessage(update, UpdateMessages.moreSpecificDomainFound(moreSpecific.toString()));
    verifyZeroInteractions(ipv6DomainTree);
  }