@Test
public void setPrimary() throws BuilderException {
// create a key modifier
KeyModifier keymod = new KeyModifier();
// create and add a KeyVersion and add it to the Key
KeyVersion keyversion1 = keymod.addKeyVersion();
// set the first keyversion as the primary
keymod.setPrimary(keyversion1);
// create and add another KeyVersion and add it to the Key
KeyVersion keyversion2 = keymod.addKeyVersion();
// check that the primary key version is equal to the key version we created and added to the
// Key
assertEquals(keyversion1, keymod.getPrimary());