@Test(groups = "slow")
  public void testAddPaymentMethod() throws Exception {
    final PaymentPluginApi api =
        getTestApi(paymentPluginApiOSGIServiceRegistration, BUNDLE_TEST_RESOURCE_PREFIX);

    final PaymentMethodPlugin paymentMethodPlugin = Mockito.mock(PaymentMethodPlugin.class);
    Mockito.when(paymentMethodPlugin.getExternalPaymentMethodId())
        .thenReturn(UUID.randomUUID().toString());

    api.addPaymentMethod(
        UUID.randomUUID(),
        UUID.randomUUID(),
        paymentMethodPlugin,
        true,
        ImmutableList.<PluginProperty>of(),
        callContext);
  }
  @Test(groups = "slow")
  public void testGetPaymentMethodDetail() throws Exception {
    final PaymentPluginApi api =
        getTestApi(paymentPluginApiOSGIServiceRegistration, BUNDLE_TEST_RESOURCE_PREFIX);
    final PaymentMethodPlugin res =
        api.getPaymentMethodDetail(
            UUID.randomUUID(), UUID.randomUUID(), ImmutableList.<PluginProperty>of(), callContext);

    assertEquals(res.getExternalPaymentMethodId(), "external_payment_method_id");
    Assert.assertTrue(res.isDefaultPaymentMethod());
    assertEquals(res.getProperties().size(), 2);
    assertEquals(res.getProperties().get(0).getKey(), "key1");
    assertEquals(res.getProperties().get(0).getValue(), "value1");
    assertEquals(res.getProperties().get(1).getKey(), "key2");
    assertEquals(res.getProperties().get(1).getValue(), "value2");
  }