@Test
public void testGetPaymenttypes() throws Exception {

    // Create the resource that is to be tested
    PaymenttypeList resource = new PaymenttypeList();
    // Inject fake OSGi service UkelonnService
    UkelonnService ukelonn = mock(UkelonnService.class);
    when(ukelonn.getPaymenttypes()).thenReturn(getPaymenttypes());
    resource.ukelonn = ukelonn;
    // Run the method that is to be tested
    List<TransactionType> paymenttypes = resource.getPaymenttypes();
    // Check the output
    assertEquals(2, paymenttypes.size());
}