@@ -0,0 +1,765 @@
+package com.punchthrough.bean.sdk;%0A%0Aimport android.os.Handler;%0A%0Aimport org.mockito.invocation.InvocationOnMock;%0Aimport org.mockito.stubbing.Answer;%0A%0Aimport static org.mockito.Matchers.any;%0Aimport static org.mockito.Mockito.doAnswer;%0Aimport static org.mockito.Mockito.mock;%0A%0Apublic class UnitTestUtils %7B%0A%0A    public static Handler ImmediatelyRunningHandler() %7B%0A        Handler h = mock(Handler.class);%0A        doAnswer(new Answer() %7B%0A            public Object answer(InvocationOnMock invocation) %7B%0A                Object%5B%5D args = invocation.getArguments();%0A                Runnable r = (Runnable) args%5B0%5D;%0A                r.run();  // run immediately%0A                return null;%0A            %7D%0A        %7D).when(h).post(any(Runnable.class));%0A        return h;%0A    %7D%0A%7D%0A

add unit testing utility class