Sample java code to create Enroll SMS factor api request

Can someone help me to create Enroll SMS factor api request using java client? The Factor object has FactorProfile which is an empty object so unable to create SMS factor request via java code.