@Test
public void testConvertNamenodeRole() {

  assertEquals(NamenodeRoleProto.BACKUP,
      PBHelper.convert(NamenodeRole.BACKUP));
  assertEquals(NamenodeRoleProto.CHECKPOINT,
      PBHelper.convert(NamenodeRole.CHECKPOINT));
  assertEquals(NamenodeRoleProto.NAMENODE,
      PBHelper.convert(NamenodeRole.NAMENODE));
  assertEquals(NamenodeRole.BACKUP,
      PBHelper.convert(NamenodeRoleProto.BACKUP));
  assertEquals(NamenodeRole.CHECKPOINT,
      PBHelper.convert(NamenodeRoleProto.CHECKPOINT));
  assertEquals(NamenodeRole.NAMENODE,
      PBHelper.convert(NamenodeRoleProto.NAMENODE));
}