// Deny empty addresses tickets in policy.
config.setEmptyAddressesAllowed( false );
// Get the mutable ticket part.
KerberosPrincipal clientPrincipal = new KerberosPrincipal( "hnelson@EXAMPLE.COM" );
EncTicketPartModifier encTicketPartModifier = getTicketArchetype( clientPrincipal );
// Make changes to test.
encTicketPartModifier.setFlag( TicketFlag.FORWARDABLE );
HostAddress[] address =
{new HostAddress( InetAddress.getByAddress( new byte[4] ) )};
HostAddresses addresses = new HostAddresses( address );
encTicketPartModifier.setClientAddresses( addresses );
// Seal the ticket for the server.
KerberosPrincipal serverPrincipal = new KerberosPrincipal( "krbtgt/EXAMPLE.COM@EXAMPLE.COM" );
String passPhrase = "randomKey";
EncryptionKey serverKey = getEncryptionKey( serverPrincipal, passPhrase );