A Study to Evaluate the Pharmacokinetics of JNJ-56021927 in Participants With Mild or Moderate Hepatic Impairment Compared With Participants With Normal Hepatic Function

The purpose of this study is to characterize the pharmacokinetics of JNJ-56021927 in participants with mild and moderate hepatic impairment.

This is an open-label (all people know the identity of the intervention), single-dose, single-center, non-randomized study of JNJ-56021927 in participants who either have hepatic impairment or qualify for the control group. The study consists of 3 Phases: Screening Phase (21 Days), open-label treatment Phase (8 Days) and follow up Phase (49 Days). The duration of participation in the study for each participant is approximately 78 Days. Primarily the pharmacokinetics of JNJ-56021927 will be measured. Participants' safety will be monitored throughout the study.

Eligibility Criteria:
Inclusion Criteria:

* Must have a clinically stable hepatic function as confirmed by the serum bilirubin and transaminase levels measured during Screening and those measured within 24 hours prior to study drug administration
* Sign an informed consent document indicating that the participant understands the purpose of and procedures required for the study and are willing to participate in the study. Participants must not have hepatic encephalopathy greater than or equal to (\>=) Grade 3 where the participant lacks the capacity to provide informed consent as judged by the investigator. Mild or moderate hepatic encephalopathy that would not impede informed consent in the investigator's judgment is permitted
* Willing and able to adhere to the prohibitions and restrictions as specified in the protocol
* If a man is sexually active with a woman of childbearing potential and has not had a vasectomy, he must agree to use an adequate contraception method as deemed appropriate by the Investigator, always use a condom during sexual intercourse, and agree to not donate sperm during the study and for 3 months after receiving the study drug
* Body mass index (BMI) between 18 and 35 kilogram (kg)/meter (m)\^2 (inclusive), and body weight not less than 50 kg
* The participant must have a total Child-Pugh score of 5 to 6, inclusive (mild); or 7 to 9, inclusive (moderate); the investigator will determine hepatic impairment

Exclusion Criteria:

* Screening thyroid-stimulating hormone (TSH) level greater than (\>) Upper Limit of Normal (ULN), or participants with known history of thyroid disorders
* Participant who is on thyroid replacement therapy
* History of drug abuse according to Diagnostic and Statistical Manual of Mental Disorders (4th edition) (DSM-IV) criteria within 2 years before Screening or positive test result(s) for drugs of abuse (that is, opiates, barbiturates, benzodiazepines, cocaine, cannabinoids, and amphetamines) at Screening or Day -1. A positive test for participants with prescriptions for drugs that may interfere with the drug screen (that is, opiates and benzodiazepines) may be allowed
* Known allergy to the study drug or any of the excipients of the formulation
* Intention to donate blood or blood products during the study or for 3 months after the administration of the study drug
* A man who plans to father a child while enrolled in the study or for 3 months after receiving the study drug
* Known history of seizure or condition that may predispose to seizure or on medication that lowers seizure threshold
* History of stomach or intestinal surgery or resection that would potentially alter absorption or excretion of orally administered drugs
* Gall bladder (example, cholecystitis and cholelithiasis) or biliary tract disease
* Clinically significant renal laboratory findings including serum creatinine level greater than (\>) 1.5 times ULN
* Inability to fast for 12 hours
* History of or current clinically significant medical illness
* Positive test for human immunodeficiency virus (HIV) 1 and 2 antibodies