/**
*/
public class EqualityTest {
public static void main(String[] args) throws Exception {
JavaTestHelper lhs, rhs;
lhs = new JavaTestHelper();
rhs = new JavaTestHelper();
lhs.req_int = 1;
rhs.req_int = 1;
// this_present = True
// that_present = True
if (lhs.equals(rhs) != true)
throw new RuntimeException("Failure");
if (lhs.hashCode() != rhs.hashCode())
throw new RuntimeException("Failure");
lhs = new JavaTestHelper();
rhs = new JavaTestHelper();
lhs.req_int = 1;
rhs.req_int = 2;
// this_present = True
// that_present = True
if (lhs.equals(rhs) != false)
throw new RuntimeException("Failure");
lhs = new JavaTestHelper();
rhs = new JavaTestHelper();
lhs.req_int = 1;
rhs.req_int = 1;
rhs.setReq_intIsSet(true);
// this_present = True
// that_present = True
if (lhs.equals(rhs) != true)
throw new RuntimeException("Failure");
if (lhs.hashCode() != rhs.hashCode())
throw new RuntimeException("Failure");
lhs = new JavaTestHelper();
rhs = new JavaTestHelper();
lhs.req_int = 1;
rhs.req_int = 2;
rhs.setReq_intIsSet(true);
// this_present = True
// that_present = True
if (lhs.equals(rhs) != false)
throw new RuntimeException("Failure");
lhs = new JavaTestHelper();
rhs = new JavaTestHelper();
lhs.req_int = 1;
rhs.req_int = 1;
lhs.setReq_intIsSet(true);
// this_present = True
// that_present = True
if (lhs.equals(rhs) != true)
throw new RuntimeException("Failure");
if (lhs.hashCode() != rhs.hashCode())
throw new RuntimeException("Failure");
lhs = new JavaTestHelper();
rhs = new JavaTestHelper();
lhs.req_int = 1;
rhs.req_int = 2;
lhs.setReq_intIsSet(true);
// this_present = True
// that_present = True
if (lhs.equals(rhs) != false)
throw new RuntimeException("Failure");
lhs = new JavaTestHelper();
rhs = new JavaTestHelper();
lhs.req_int = 1;
rhs.req_int = 1;
lhs.setReq_intIsSet(true);
rhs.setReq_intIsSet(true);
// this_present = True
// that_present = True
if (lhs.equals(rhs) != true)
throw new RuntimeException("Failure");
if (lhs.hashCode() != rhs.hashCode())
throw new RuntimeException("Failure");
lhs = new JavaTestHelper();
rhs = new JavaTestHelper();
lhs.req_int = 1;
rhs.req_int = 2;
lhs.setReq_intIsSet(true);
rhs.setReq_intIsSet(true);
// this_present = True
// that_present = True
if (lhs.equals(rhs) != false)
throw new RuntimeException("Failure");
lhs = new JavaTestHelper();
rhs = new JavaTestHelper();
lhs.opt_int = 1;
rhs.opt_int = 1;
// this_present = False
// that_present = False
if (lhs.equals(rhs) != true)
throw new RuntimeException("Failure");
if (lhs.hashCode() != rhs.hashCode())
throw new RuntimeException("Failure");
lhs = new JavaTestHelper();
rhs = new JavaTestHelper();
lhs.opt_int = 1;
rhs.opt_int = 2;
// this_present = False
// that_present = False
if (lhs.equals(rhs) != true)
throw new RuntimeException("Failure");
if (lhs.hashCode() != rhs.hashCode())
throw new RuntimeException("Failure");
lhs = new JavaTestHelper();
rhs = new JavaTestHelper();
lhs.opt_int = 1;
rhs.opt_int = 1;
rhs.setOpt_intIsSet(true);
// this_present = False
// that_present = True
if (lhs.equals(rhs) != false)
throw new RuntimeException("Failure");
lhs = new JavaTestHelper();
rhs = new JavaTestHelper();
lhs.opt_int = 1;
rhs.opt_int = 2;
rhs.setOpt_intIsSet(true);
// this_present = False
// that_present = True
if (lhs.equals(rhs) != false)
throw new RuntimeException("Failure");
lhs = new JavaTestHelper();
rhs = new JavaTestHelper();
lhs.opt_int = 1;
rhs.opt_int = 1;
lhs.setOpt_intIsSet(true);
// this_present = True
// that_present = False
if (lhs.equals(rhs) != false)
throw new RuntimeException("Failure");
lhs = new JavaTestHelper();
rhs = new JavaTestHelper();
lhs.opt_int = 1;
rhs.opt_int = 2;
lhs.setOpt_intIsSet(true);
// this_present = True
// that_present = False
if (lhs.equals(rhs) != false)
throw new RuntimeException("Failure");
lhs = new JavaTestHelper();
rhs = new JavaTestHelper();
lhs.opt_int = 1;
rhs.opt_int = 1;
lhs.setOpt_intIsSet(true);
rhs.setOpt_intIsSet(true);
// this_present = True
// that_present = True
if (lhs.equals(rhs) != true)
throw new RuntimeException("Failure");
if (lhs.hashCode() != rhs.hashCode())
throw new RuntimeException("Failure");
lhs = new JavaTestHelper();
rhs = new JavaTestHelper();
lhs.opt_int = 1;
rhs.opt_int = 2;
lhs.setOpt_intIsSet(true);
rhs.setOpt_intIsSet(true);
// this_present = True
// that_present = True
if (lhs.equals(rhs) != false)
throw new RuntimeException("Failure");
lhs = new JavaTestHelper();
rhs = new JavaTestHelper();
lhs.req_obj = "foo";
rhs.req_obj = "foo";
lhs.req_obj = null;
rhs.req_obj = null;
// this_present = False
// that_present = False
if (lhs.equals(rhs) != true)
throw new RuntimeException("Failure");
if (lhs.hashCode() != rhs.hashCode())
throw new RuntimeException("Failure");
lhs = new JavaTestHelper();
rhs = new JavaTestHelper();
lhs.req_obj = "foo";
rhs.req_obj = "bar";
lhs.req_obj = null;
rhs.req_obj = null;
// this_present = False
// that_present = False
if (lhs.equals(rhs) != true)
throw new RuntimeException("Failure");
if (lhs.hashCode() != rhs.hashCode())
throw new RuntimeException("Failure");
lhs = new JavaTestHelper();
rhs = new JavaTestHelper();
lhs.req_obj = "foo";
rhs.req_obj = "foo";
lhs.req_obj = null;
// this_present = False
// that_present = True
if (lhs.equals(rhs) != false)
throw new RuntimeException("Failure");
lhs = new JavaTestHelper();
rhs = new JavaTestHelper();
lhs.req_obj = "foo";
rhs.req_obj = "bar";
lhs.req_obj = null;
// this_present = False
// that_present = True
if (lhs.equals(rhs) != false)
throw new RuntimeException("Failure");
lhs = new JavaTestHelper();
rhs = new JavaTestHelper();
lhs.req_obj = "foo";
rhs.req_obj = "foo";
rhs.req_obj = null;
// this_present = True
// that_present = False
if (lhs.equals(rhs) != false)
throw new RuntimeException("Failure");
lhs = new JavaTestHelper();
rhs = new JavaTestHelper();
lhs.req_obj = "foo";
rhs.req_obj = "bar";
rhs.req_obj = null;
// this_present = True
// that_present = False
if (lhs.equals(rhs) != false)
throw new RuntimeException("Failure");
lhs = new JavaTestHelper();
rhs = new JavaTestHelper();
lhs.req_obj = "foo";
rhs.req_obj = "foo";
// this_present = True
// that_present = True
if (lhs.equals(rhs) != true)
throw new RuntimeException("Failure");
if (lhs.hashCode() != rhs.hashCode())
throw new RuntimeException("Failure");
lhs = new JavaTestHelper();
rhs = new JavaTestHelper();
lhs.req_obj = "foo";
rhs.req_obj = "bar";
// this_present = True
// that_present = True
if (lhs.equals(rhs) != false)
throw new RuntimeException("Failure");
lhs = new JavaTestHelper();
rhs = new JavaTestHelper();
lhs.opt_obj = "foo";
rhs.opt_obj = "foo";
lhs.opt_obj = null;
rhs.opt_obj = null;
// this_present = False
// that_present = False
if (lhs.equals(rhs) != true)
throw new RuntimeException("Failure");
if (lhs.hashCode() != rhs.hashCode())
throw new RuntimeException("Failure");
lhs = new JavaTestHelper();
rhs = new JavaTestHelper();
lhs.opt_obj = "foo";
rhs.opt_obj = "bar";
lhs.opt_obj = null;
rhs.opt_obj = null;
// this_present = False
// that_present = False
if (lhs.equals(rhs) != true)
throw new RuntimeException("Failure");
if (lhs.hashCode() != rhs.hashCode())
throw new RuntimeException("Failure");
lhs = new JavaTestHelper();
rhs = new JavaTestHelper();
lhs.opt_obj = "foo";
rhs.opt_obj = "foo";
lhs.opt_obj = null;
// this_present = False
// that_present = True
if (lhs.equals(rhs) != false)
throw new RuntimeException("Failure");
lhs = new JavaTestHelper();
rhs = new JavaTestHelper();
lhs.opt_obj = "foo";
rhs.opt_obj = "bar";
lhs.opt_obj = null;
// this_present = False
// that_present = True
if (lhs.equals(rhs) != false)
throw new RuntimeException("Failure");
lhs = new JavaTestHelper();
rhs = new JavaTestHelper();
lhs.opt_obj = "foo";
rhs.opt_obj = "foo";
rhs.opt_obj = null;
// this_present = True
// that_present = False
if (lhs.equals(rhs) != false)
throw new RuntimeException("Failure");
lhs = new JavaTestHelper();
rhs = new JavaTestHelper();
lhs.opt_obj = "foo";
rhs.opt_obj = "bar";
rhs.opt_obj = null;
// this_present = True
// that_present = False
if (lhs.equals(rhs) != false)
throw new RuntimeException("Failure");
lhs = new JavaTestHelper();
rhs = new JavaTestHelper();
lhs.opt_obj = "foo";
rhs.opt_obj = "foo";
// this_present = True
// that_present = True
if (lhs.equals(rhs) != true)
throw new RuntimeException("Failure");
if (lhs.hashCode() != rhs.hashCode())
throw new RuntimeException("Failure");
lhs = new JavaTestHelper();
rhs = new JavaTestHelper();
lhs.opt_obj = "foo";
rhs.opt_obj = "bar";
// this_present = True
// that_present = True
if (lhs.equals(rhs) != false)
throw new RuntimeException("Failure");
lhs = new JavaTestHelper();
rhs = new JavaTestHelper();
lhs.req_bin = ByteBuffer.wrap(new byte[]{1,2});
rhs.req_bin = ByteBuffer.wrap(new byte[]{1,2});
lhs.req_bin = null;
rhs.req_bin = null;
// this_present = False
// that_present = False
if (lhs.equals(rhs) != true)
throw new RuntimeException("Failure");
if (lhs.hashCode() != rhs.hashCode())
throw new RuntimeException("Failure");
lhs = new JavaTestHelper();
rhs = new JavaTestHelper();
lhs.req_bin = ByteBuffer.wrap(new byte[]{1,2});
rhs.req_bin = ByteBuffer.wrap(new byte[]{3,4});
lhs.req_bin = null;
rhs.req_bin = null;
// this_present = False
// that_present = False
if (lhs.equals(rhs) != true)
throw new RuntimeException("Failure");
if (lhs.hashCode() != rhs.hashCode())
throw new RuntimeException("Failure");
lhs = new JavaTestHelper();
rhs = new JavaTestHelper();
lhs.req_bin = ByteBuffer.wrap(new byte[]{1,2});
rhs.req_bin = ByteBuffer.wrap(new byte[]{1,2});
lhs.req_bin = null;
// this_present = False
// that_present = True
if (lhs.equals(rhs) != false)
throw new RuntimeException("Failure");
lhs = new JavaTestHelper();
rhs = new JavaTestHelper();
lhs.req_bin = ByteBuffer.wrap(new byte[]{1,2});
rhs.req_bin = ByteBuffer.wrap(new byte[]{3,4});
lhs.req_bin = null;
// this_present = False
// that_present = True
if (lhs.equals(rhs) != false)
throw new RuntimeException("Failure");
lhs = new JavaTestHelper();
rhs = new JavaTestHelper();
lhs.req_bin = ByteBuffer.wrap(new byte[]{1,2});
rhs.req_bin = ByteBuffer.wrap(new byte[]{1,2});
rhs.req_bin = null;
// this_present = True
// that_present = False
if (lhs.equals(rhs) != false)
throw new RuntimeException("Failure");
lhs = new JavaTestHelper();
rhs = new JavaTestHelper();
lhs.req_bin = ByteBuffer.wrap(new byte[]{1,2});
rhs.req_bin = ByteBuffer.wrap(new byte[]{3,4});
rhs.req_bin = null;
// this_present = True
// that_present = False
if (lhs.equals(rhs) != false)
throw new RuntimeException("Failure");
lhs = new JavaTestHelper();
rhs = new JavaTestHelper();
lhs.req_bin = ByteBuffer.wrap(new byte[]{1,2});
rhs.req_bin = ByteBuffer.wrap(new byte[]{1,2});
// this_present = True
// that_present = True
if (lhs.equals(rhs) != true)
throw new RuntimeException("Failure");
if (lhs.hashCode() != rhs.hashCode())
throw new RuntimeException("Failure");
lhs = new JavaTestHelper();
rhs = new JavaTestHelper();
lhs.req_bin = ByteBuffer.wrap(new byte[]{1,2});
rhs.req_bin = ByteBuffer.wrap(new byte[]{3,4});
// this_present = True
// that_present = True
if (lhs.equals(rhs) != false)
throw new RuntimeException("Failure");
lhs = new JavaTestHelper();
rhs = new JavaTestHelper();
lhs.opt_bin = ByteBuffer.wrap(new byte[]{1,2});
rhs.opt_bin = ByteBuffer.wrap(new byte[]{1,2});
lhs.opt_bin = null;
rhs.opt_bin = null;
// this_present = False
// that_present = False
if (lhs.equals(rhs) != true)
throw new RuntimeException("Failure");
if (lhs.hashCode() != rhs.hashCode())
throw new RuntimeException("Failure");
lhs = new JavaTestHelper();
rhs = new JavaTestHelper();
lhs.opt_bin = ByteBuffer.wrap(new byte[]{1,2});
rhs.opt_bin = ByteBuffer.wrap(new byte[]{3,4});
lhs.opt_bin = null;
rhs.opt_bin = null;
// this_present = False
// that_present = False
if (lhs.equals(rhs) != true)
throw new RuntimeException("Failure");
if (lhs.hashCode() != rhs.hashCode())
throw new RuntimeException("Failure");
lhs = new JavaTestHelper();
rhs = new JavaTestHelper();
lhs.opt_bin = ByteBuffer.wrap(new byte[]{1,2});
rhs.opt_bin = ByteBuffer.wrap(new byte[]{1,2});
lhs.opt_bin = null;
// this_present = False
// that_present = True
if (lhs.equals(rhs) != false)
throw new RuntimeException("Failure");
lhs = new JavaTestHelper();
rhs = new JavaTestHelper();
lhs.opt_bin = ByteBuffer.wrap(new byte[]{1,2});
rhs.opt_bin = ByteBuffer.wrap(new byte[]{3,4});
lhs.opt_bin = null;
// this_present = False
// that_present = True
if (lhs.equals(rhs) != false)
throw new RuntimeException("Failure");
lhs = new JavaTestHelper();
rhs = new JavaTestHelper();
lhs.opt_bin = ByteBuffer.wrap(new byte[]{1,2});
rhs.opt_bin = ByteBuffer.wrap(new byte[]{1,2});
rhs.opt_bin = null;
// this_present = True
// that_present = False
if (lhs.equals(rhs) != false)
throw new RuntimeException("Failure");
lhs = new JavaTestHelper();
rhs = new JavaTestHelper();
lhs.opt_bin = ByteBuffer.wrap(new byte[]{1,2});
rhs.opt_bin = ByteBuffer.wrap(new byte[]{3,4});
rhs.opt_bin = null;
// this_present = True
// that_present = False
if (lhs.equals(rhs) != false)
throw new RuntimeException("Failure");
lhs = new JavaTestHelper();
rhs = new JavaTestHelper();
lhs.opt_bin = ByteBuffer.wrap(new byte[]{1,2});
rhs.opt_bin = ByteBuffer.wrap(new byte[]{1,2});
// this_present = True
// that_present = True
if (lhs.equals(rhs) != true)
throw new RuntimeException("Failure");
if (lhs.hashCode() != rhs.hashCode())
throw new RuntimeException("Failure");
lhs = new JavaTestHelper();
rhs = new JavaTestHelper();
lhs.opt_bin = ByteBuffer.wrap(new byte[]{1,2});
rhs.opt_bin = ByteBuffer.wrap(new byte[]{3,4});
// this_present = True
// that_present = True
if (lhs.equals(rhs) != false)
throw new RuntimeException("Failure");
}