### Question:
KdcConnection { public ServiceTicket getServiceTicket( String clientPrincipal, String password, String serverPrincipal ) throws KerberosException { TgtRequest clientTgtReq = new TgtRequest(); clientTgtReq.setClientPrincipal( clientPrincipal ); clientTgtReq.setPassword( password ); TgTicket tgt = getTgt( clientTgtReq ); return getServiceTicket( new ServiceTicketRequest( tgt, serverPrincipal ) ); } KdcConnection( KdcConfig config ); TgTicket getTgt( String principal, String password ); ServiceTicket getServiceTicket( String clientPrincipal, String password, String serverPrincipal ); TgTicket getTgt( TgtRequest clientTgtReq ); ChangePasswordResult changePassword( String clientPrincipal, String oldPassword, String newPassword );  }### Answer:
@Test public void testGetServiceTicket() throws Exception { ServiceTicket rep = conn.getServiceTicket( principalName, userPassword, serverPrincipal ); assertNotNull( rep ); }