/** Test. */
  @Test
  public void testWithThemeAndGttIds() {
    final Long themeId = 5L;
    final Long gttId = 6L;
    final MembershipCriteriaDTO mcdto = new MembershipCriteriaDTO();
    mcdto.setCriteria(criteria);
    mcdto.setThemeId(themeId);
    mcdto.setGalleryTabTemplateId(gttId);

    context.checking(
        new Expectations() {
          {
            oneOf(ac).getParams();
            will(returnValue(mcdto));

            oneOf(themeProxyMapper).execute(themeId);
            will(returnValue(theme));

            oneOf(galleryTabTemplateProxyMappery).execute(gttId);
            will(returnValue(gtt));
          }
        });

    PersistenceRequest<MembershipCriteria> result = sut.transform(ac);

    assertEquals(criteria, result.getDomainEnity().getCriteria());
    assertNotNull(result.getDomainEnity().getTheme());
    assertNotNull(result.getDomainEnity().getGalleryTabTemplate());

    context.assertIsSatisfied();
  }
  /** Test. */
  @Test
  public void testNullThemeAndGttIds() {
    final MembershipCriteriaDTO mcdto = new MembershipCriteriaDTO();
    mcdto.setCriteria(criteria);

    context.checking(
        new Expectations() {
          {
            oneOf(ac).getParams();
            will(returnValue(mcdto));
          }
        });

    PersistenceRequest<MembershipCriteria> result = sut.transform(ac);

    assertEquals(criteria, result.getDomainEnity().getCriteria());
    assertNull(result.getDomainEnity().getTheme());
    assertNull(result.getDomainEnity().getGalleryTabTemplate());

    context.assertIsSatisfied();
  }