use of org.apache.hadoop.security.proto.SecurityProtos.RenewDelegationTokenRequestProto in project hadoop by apache.
the class TestYarnApiClasses method testRenewDelegationTokenRequestPBImpl.
/**
* Test RenewDelegationTokenRequestPBImpl.
* Test a transformation to prototype and back
*/
@Test
public void testRenewDelegationTokenRequestPBImpl() {
Token token = getDelegationToken();
RenewDelegationTokenRequestPBImpl original = new RenewDelegationTokenRequestPBImpl();
original.setDelegationToken(token);
RenewDelegationTokenRequestProto protoType = original.getProto();
RenewDelegationTokenRequestPBImpl copy = new RenewDelegationTokenRequestPBImpl(protoType);
assertNotNull(copy.getDelegationToken());
//compare source and converted
assertEquals(token, copy.getDelegationToken());
}
Aggregations