@@ -0,0 +1,2398 @@
+package org.westmalle.wayland.protocol;%0A%0Aimport org.freedesktop.wayland.server.Client;%0Aimport org.freedesktop.wayland.server.WlPointerResource;%0Aimport org.freedesktop.wayland.server.jna.WaylandServerLibrary;%0Aimport org.freedesktop.wayland.server.jna.WaylandServerLibraryMapping;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.mockito.Mock;%0Aimport org.powermock.api.mockito.PowerMockito;%0Aimport org.powermock.core.classloader.annotations.PrepareForTest;%0Aimport org.powermock.modules.junit4.PowerMockRunner;%0Aimport org.westmalle.wayland.output.PointerDevice;%0A%0Aimport static com.google.common.truth.Truth.assertThat;%0Aimport static org.mockito.Mockito.mock;%0Aimport static org.mockito.Mockito.times;%0Aimport static org.mockito.Mockito.verify;%0Aimport static org.mockito.Mockito.when;%0A%0A@RunWith(PowerMockRunner.class)%0A@PrepareForTest(%7B%0A        //following classes have static methods, so we have to powermock them:%0A        WaylandServerLibrary.class,%0A%7D)%0Apublic class WlPointerTest %7B%0A%0A    @Mock%0A    private PointerDevice pointerDevice;%0A%0A    @Mock%0A    private WaylandServerLibraryMapping waylandServerLibraryMapping;%0A%0A    @Before%0A    public void setUp() throws Exception %7B%0A        PowerMockito.mockStatic(WaylandServerLibrary.class);%0A        when(WaylandServerLibrary.INSTANCE()).thenReturn(this.waylandServerLibraryMapping);%0A    %7D%0A%0A    @Test%0A    public void testRelease() throws Exception %7B%0A        //given%0A        final WlPointerResource wlPointerResource = mock(WlPointerResource.class);%0A        final WlPointer wlPointer = new WlPointer(this.pointerDevice);%0A        //when%0A        wlPointer.release(wlPointerResource);%0A        //then%0A        verify(wlPointerResource,%0A               times(1)).destroy();%0A    %7D%0A%0A    @Test%0A    public void testCreate() throws Exception %7B%0A        //given%0A        final Client client = mock(Client.class);%0A        final int version = 1;%0A        final int id = 1;%0A        final WlPointer wlPointer = new WlPointer(this.pointerDevice);%0A        //when%0A        final WlPointerResource wlPointerResource = wlPointer.create(client,%0A                                                                     version,%0A                                                                     id);%0A        //then%0A        assertThat(wlPointerResource).isNotNull();%0A        assertThat(wlPointerResource.getImplementation()).isSameAs(wlPointer);%0A    %7D%0A%7D

add wlpointer tests