you need to ensure that both relations are populated: you set the contact into the company but not the company into the contact.
so probably the contact is saved (you can check the db) but the id to company is empty...
the bidirectional relations need to be filled manually on both sides (consistency)
you have only to add a line:
Company company = new Company()
company.setName("ACME PTY LTD");
company.setAddress("123 Test St");
Contact contact = new Contact();
ahh! That makes sense. so simple!
Thanks for that.