public class KeyczarFileReaderTest extends TestCase {
private static final String TEST_DATA = "./testdata";
public void testGetPrimary() throws Exception {
// based on the checked in files, we know version 2 is primary.
KeyczarReader reader = new KeyczarFileReader(TEST_DATA + "/rsa");
String knownPrimaryKey = reader.getKey(2 /* primary key version */);
String readerKey = reader.getKey();
assertEquals(knownPrimaryKey, readerKey);
}