I don't think we can get rid of dbunit entirely in one go. So yes this probably will hang around for a while. 

Pushed new commit for minor improvement. 

----- Original Message -----

> From: "David Mason" <notifications@github.com>
> To: "zanata/zanata-server" <zanata-server@noreply.github.com>
> Cc: "Patrick Huang" <pahuang@redhat.com>
> Sent: Thursday, July 25, 2013 1:27:30 PM
> Subject: Re: [zanata-server] rhbz987235 - fix implicit hibernate flush (#69)

> In
> zanata-war/src/test/java/org/zanata/service/impl/TranslationServiceImplTest.java:
> > +   @Test
> > +   public void willCheckPermissionForReviewState()
> > +   {
> > +      TranslationService transService =
> > seam.autowire(TranslationServiceImpl.class);
> > +
> > +      // untranslated
> > +      TransUnitId transUnitId = new TransUnitId(3L);
> > +      TransUnitUpdateRequest translateReq = new
> > TransUnitUpdateRequest(transUnitId, Lists.newArrayList("a", "b"),
> > ContentState.Approved, 0);
> > +
> > +      List<TranslationResult> result = transService.translate(new
> > LocaleId("de"), Lists.newArrayList(translateReq));
> > +
> > +      verify(identity).checkPermission(eq("translation-review"),
> > isA(HProject.class), isA(HLocale.class));
> > +      assertThat(result.get(0).isTranslationSuccessful(), is(true));
> > +      assertThat(result.get(0).getBaseVersionNum(), is(0));
> > +
> > assertThat(result.get(0).getTranslatedTextFlowTarget().getVersionNum(),
> > is(1)); // moved up only one version
> > +      assertThat(result.get(0).getTranslatedTextFlowTarget().getState(),
> > is(ContentState.Translated));

> If we are able to use JUnit soon then it would be a waste of time to
> implement something like this, but it might still be worth considering if
> the dbunit stuff will hang around for a long time.

> —
> Reply to this email directly or view it on GitHub .