public class LibvirtSecretDefTest extends TestCase {
public void testVolumeSecretDef() {
String uuid = "db66f42b-a79e-4666-9910-9dfc8a024427";
String name = "myEncryptedQCOW2";
usage use = usage.VOLUME;
LibvirtSecretDef def = new LibvirtSecretDef(use, uuid);
def.setVolumeVolume(name);
String expectedXml = "<secret ephemeral='no' private='no'>\n<uuid>" + uuid + "</uuid>\n" +
"<usage type='" + use.toString() + "'>\n<volume>" + name + "</volume>\n</usage>\n</secret>\n";
assertEquals(expectedXml, def.toString());
}