@Test
public void testPersistNewKerberosDescriptorEntity() {

  //GIVEN
  KerberosDescriptorEntity kerberosDescriptorEntity = new KerberosDescriptorEntity();
  kerberosDescriptorEntity.setName(TEST_KERBEROS_DESCRIPTOR_ENTITY_NAME);
  Capture<KerberosDescriptorEntity> capturedArgument = EasyMock.newCapture();
  entityManager.persist(capture(capturedArgument));
  replay(entityManager);
  //WHEN
  kerberosDescriptorDAO.create(kerberosDescriptorEntity);
  //THEN
  Assert.assertNotNull(capturedArgument);
  Assert.assertEquals("The persisted object is not the expected one", kerberosDescriptorEntity, capturedArgument.getValue());
}