@Test
public void testModifyPaymenttype() {

    // Create the resource that is to be tested
    AdminPaymenttype resource = new AdminPaymenttype();
    // Inject fake OSGi service UkelonnService
    UkelonnService ukelonn = mock(UkelonnService.class);
    resource.ukelonn = ukelonn;
    // Find a payment type to modify
    List<TransactionType> paymenttypes = getPaymenttypes();
    TransactionType paymenttype = paymenttypes.get(1);
    Double originalAmount = paymenttype.getTransactionAmount();
    // Modify the amount of the payment type
    paymenttype.setTransactionAmount(originalAmount + 1);
    when(ukelonn.modifyPaymenttype(paymenttype)).thenReturn(Arrays.asList(paymenttype));
    // Run the method that is to be tested
    List<TransactionType> updatedPaymenttypes = resource.modify(paymenttype);
    // Verify that the updated amount is larger than the original amount
    TransactionType updatedPaymenttype = updatedPaymenttypes.get(0);
    assertThat(updatedPaymenttype.getTransactionAmount()).isGreaterThan(originalAmount);
}