# JUnit Testing & Mock Service Task

**URL:** <https://forum.flowable.org/t/junit-testing-mock-service-task/3818>\
**Category:** Flowable Engine\
**Created:** [May 2, 2019, 4:45pm UTC](https://forum.flowable.org/t/junit-testing-mock-service-task/3818 "2019-05-02T16:45:05Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Bihan](https://avatars.discourse-cdn.com/v4/letter/b/4da419/32.png) [@Bihan](https://forum.flowable.org/u/Bihan)\
**Post date:** [May 8, 2019, 5:56am UTC](https://forum.flowable.org/t/junit-testing-mock-service-task/3818/4 "2019-05-08T05:56:22Z")

</div>

Yes, i am using delegateExpression. If possible can you give a simple sample on how to do it with @MockBeans for flowable.

I have tried with MockExpressionManager(), but this did not worked. My test runs the actual service task instead of the mock. I have discussed about it here [Testing processes with junit in spring](https://forum.flowable.org/t/testing-processes-with-junit-in-spring/3372/2)

---

_[View the full topic](https://forum.flowable.org/t/junit-testing-mock-service-task/3818)._
