/*
 * Copyright 2015 Johan Walles <johan.walles@gmail.com>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.gmail.walles.johan.exactype;

import android.content.Context;
import android.view.MotionEvent;

import org.junit.Assert;
import org.junit.Test;
import org.mockito.Mockito;

public class GestureDetectorTest {
    @Test
    public void testSingleTap() {
        GestureListener listener = Mockito.mock(GestureListener.class);
        Context context = Mockito.mock(Context.class);
        GestureDetector testMe = new GestureDetector(context, listener);

        MotionEvent down = Mockito.mock(MotionEvent.class);
        testMe.onTouchEvent(down);

        MotionEvent up = Mockito.mock(MotionEvent.class);
        testMe.onTouchEvent(up);

        Mockito.verify(listener).onSingleTap(down);
    }

    @Test
    public void testSloppySingleTap() {
        Assert.fail("Test not implemented");
    }

    @Test
    public void testTooLongSingleTap() {
        Assert.fail("Test not implemented");
    }

    @Test
    public void testTooFarSingleTap() {
        Assert.fail("Test not implemented");
    }

    @Test
    public void testOnFling() {
        Assert.fail("Test not implemented");
    }

    // FIXME: Add more negative fling tests
}

@@ -721,16 +721,55 @@
 onEvent;
+%0Aimport android.view.ViewConfiguration;
 %0A%0Aimport
@@ -825,104 +825,625 @@
 org.
-mockito.Mockito;%0A%0Apublic class GestureDetectorTest %7B%0A    @Test%0A    public void testSingleTap() %7B
+junit.runner.RunWith;%0Aimport org.mockito.Mockito;%0Aimport org.powermock.api.mockito.PowerMockito;%0Aimport org.powermock.core.classloader.annotations.PrepareForTest;%0Aimport org.powermock.modules.junit4.PowerMockRunner;%0A%0A@RunWith(PowerMockRunner.class)%0A@PrepareForTest( %7B ViewConfiguration.class %7D)%0Apublic class GestureDetectorTest %7B%0A    @Test%0A    public void testSingleTap() %7B%0A        ViewConfiguration viewConfiguration = Mockito.mock(ViewConfiguration.class);%0A%0A        PowerMockito.mockStatic(ViewConfiguration.class);%0A        Mockito.when(ViewConfiguration.get((Context)Mockito.any())).thenReturn(viewConfiguration);%0A
 %0A   
@@ -1558,32 +1558,33 @@
 Context.class);%0A
+%0A
         GestureD

Add initial PowerMock code to the tests