@Test
public void testHasMetadataId() throws Exception {

    MetadataValidation md1 =  _metadataValidationRepo.save(newMetadataValidation());
    md1.setValid(true);
    _metadataValidationRepo.save(md1);
    final List<MetadataValidation> found = _metadataValidationRepo.findAll(hasMetadataId(md1.getId().getMetadataId()));
    assertEquals(1, found.size());
    assertEquals(md1.getId(), found.get(0).getId());
}