public static boolean isLockOrderNormal(final Solution solution, final Object o1, final Object o2) throws Exception {

       AtomicBoolean checkOrder = new AtomicBoolean(true);

       Thread t1 = new Thread() {
           @Override
           public void run() {
               synchronized (o1) {
                   try {
                       checkOrder.set(false);
                       Thread.sleep(1000);
                   } catch (InterruptedException e) {
                   }
               }
           }
       };

       Thread t2 = new Thread() {
           @Override
           public void run() {
               solution.someMethodWithSynchronizedBlocks(o1, o2);

           }
       };

       t1.start();
       t2.start();

       return checkOrder.get();

   }