Java – understanding property-oriented testing

I read about property-based testing and wonder how I can test that code based on this paradigm.

Class invoice {

private final string ID;
private terminating string companyName;

public String name () {
return id + "_" + removeDots (companyName.trim ());
}

}

I want to test Invoice :: Name Method, so I would do something like this:

Class InvoiceTest {

// suppose, & # 39; id & # 39; and & # 39; companyName & # 39; are randomly generated values ‚Äč‚Äčautomatically
// with a certain frame
@Exam
public void nameTest (string id, string companyName) {
Invoice invoice = new invoice (ID, company name);
assertThat (bill.name ()). isEqualTo (id + "_" + removeDots (companyName.trim ()));
}

}

As you can see, that makes no sense. I reimplement the logic in the test method. Is property testing possibly only suitable for "mathematical" logic?