import ch.codeblock.qrinvoice.model.QrInvoice;
import ch.codeblock.qrinvoice.model.billinformation.BillInformation;
import ch.codeblock.qrinvoice.model.validation.BillInformationValidator;
import ch.codeblock.qrinvoice.model.validation.ValidationResult;
// ..
final QrInvoice qrInvoice = ... ;
final BillInformation billInformation = ... ; // SwicoS1v12 is a subtype of BillInformation
// validate
final ValidationResult validationResult = BillInformationValidator.create().validate(qrInvoice, billInformation);
if(validationResult.hasErrors()) {
// handle validation errors
}