# Apache Shiro vs Mockito - Which one fits your team best?

Pricing

**Apache Shiro**
No pricing available

**Mockito**
No pricing available

**Pros & Cons**
from reviews

**Apache Shiro**

Centralized Authentication Controls (7)

JVM Application Protection (5)

Difficult Initial Integration (3)

Advanced Docs Are Buried (2)

**Mockito**

Easy Day-to-Day Use (5)

Annotation-Based Mock Setup (3)

No Static Method Mocking (2)

**Ratings**
from reviews

Meets Requirements

**Apache Shiro**

**9.2** /10

Based on 10 responses

**Mockito**

**8.3** /10

Based on 14 responses

Ease of Use

**Apache Shiro**

**8.3** /10

Based on 10 responses

**Mockito**

**7.9** /10

Based on 14 responses

Ease of Setup

**Apache Shiro** Not enough data

**Mockito**

**9.0** /10

Based on 5 responses

Ease of Admin

**Apache Shiro** Not enough data

**Mockito**

**9.0** /10

Based on 5 responses

Quality of Support

**Apache Shiro**

**7.6** /10

Based on 7 responses

**Mockito**

**7.7** /10

Based on 13 responses

Has the product been a good partner in doing business?

**Apache Shiro** Not enough data

**Mockito**

**8.0** /10

Based on 5 responses

Product Direction (% positive)

**Apache Shiro**

**7.4** /10

Based on 9 responses

**Mockito**

**7.3** /10

Based on 13 responses

##### Latest reviews from Apache Shiro & Mockito

###### Apache Shiro

 ![Nenko T.](https://images.g2crowd.com/uploads/avatar/image/395644/thumb_square_58ac8fa6e7895161e2b390ccf20689bf.jpeg "Nenko T.")
NT

Reviewed by [Nenko T.](https://www.g2.com/users/fe9fbf48-2f1e-4835-80d9-51effff5b96e)

Senior Software Developer | Enterprise (\> 1000 emp.)

* * *

Rating: 5.0 out of 5

5/5

"Plays nice and easy to integrate"

Several years ago we integrated Apache Shiro to an OSGI application and it was one of the few security frameworks that played nicely. Since it was such a nice experience we deci...

[
Read full review
](https://www.g2.com/products/apache-shiro/reviews/apache-shiro-review-4558914)almost 6 years ago

 ![Sudhakar N S.](/assets/transparent-ad5be28fbcd25b7b08d2cebe1d957125437fb5407d75ee717965ad22c8808791.gif "Sudhakar N S.")
SS

Reviewed by [Sudhakar N S.](https://www.g2.com/users/092b82c3-a7d7-4501-8b66-2ff3dec93862)

Software Engineer | Enterprise (\> 1000 emp.)

* * *

Rating: 4.0 out of 5

4/5

"Java Authentication and Authorization Services (JAAS) are fantastic in Apache Shiro"

Apache Shiro is a fantastic utility for managing my security measures in Java framework of my organization. It can effectively implement user authentication, server-end encrypti...

[
Read full review
](https://www.g2.com/products/apache-shiro/reviews/apache-shiro-review-5133273)about 5 years ago

Reviewed by Verified User

Mid-Market (51-1000 emp.)

* * *

Rating: 3.5 out of 5

3.5/5

"Reliable and flexible product to use"

We are using it for security frameworks and the best thing is it’s implementation which is easy to do.

[
Read full review
](https://www.g2.com/products/apache-shiro/reviews/apache-shiro-review-4563300)almost 6 years ago

Reviewed by Verified User

Mid-Market (51-1000 emp.)

* * *

Rating: 4.5 out of 5

4.5/5

"Used Apache Shiro security mechanism in almost all the projects"

Easy to implement and very easy to maintain

[
Read full review
](https://www.g2.com/products/apache-shiro/reviews/apache-shiro-review-4562461)almost 6 years ago

 ![Bibek K.](/assets/transparent-ad5be28fbcd25b7b08d2cebe1d957125437fb5407d75ee717965ad22c8808791.gif "Bibek K.")
BK

Reviewed by [Bibek K.](https://www.g2.com/users/ab2f0afd-3114-4e42-8f82-5f6b0aab56a3)

Sr. Software Engineer | Small-Business (50 or fewer emp.)

* * *

Rating: 4.0 out of 5

4/5

"Intuitive Auth Framework"

Very basic settings setup can provide great Authentication and Authorization in the application. Easy to customize according to business needs.

[
Read full review
](https://www.g2.com/products/apache-shiro/reviews/apache-shiro-review-4560219)almost 6 years ago

###### Mockito

Reviewed by Verified User

Enterprise (\> 1000 emp.)

* * *

Rating: 4.5 out of 5

4.5/5

"Mockito - One of the best mocking framework for unit testing"

I like the most that it has huge stack overflow community to help you out. we can verify any interactions and stub our method calls. Using mockito in your existing project is th...

[
Read full review
](https://www.g2.com/products/mockito/reviews/mockito-review-4461914)about 6 years ago

 ![Prathamesh S.](/assets/transparent-ad5be28fbcd25b7b08d2cebe1d957125437fb5407d75ee717965ad22c8808791.gif "Prathamesh S.")
PS

Reviewed by [Prathamesh S.](https://www.g2.com/users/e755b308-9fda-4f98-9b96-54ac7d1633aa)

Software Engineer | Mid-Market (51-1000 emp.)

* * *

Rating: 4.5 out of 5

4.5/5

"Mocking framework used to write clean, simple and effective test cases."

One of the best frameworks out there to create Mock objects to enable testing. Decouples the testing logic from the implementation, making it easier to write clean test cases. A...

[
Read full review
](https://www.g2.com/products/mockito/reviews/mockito-review-4394524)about 6 years ago

 ![Olga K.](/assets/transparent-ad5be28fbcd25b7b08d2cebe1d957125437fb5407d75ee717965ad22c8808791.gif "Olga K.")
OK

Reviewed by [Olga K.](https://www.g2.com/users/8713c5a1-7fd9-459d-9f9a-0f8eac881cd1)

Full Stack Software Engineer | Mid-Market (51-1000 emp.)

* * *

Rating: 4.5 out of 5

4.5/5

"Perfect tool for testing framework"

It's possible to test a lot of conditions and it's easy to read. Just need to know what's happening inside. Once you learn it, it's clear.

[
Read full review
](https://www.g2.com/products/mockito/reviews/mockito-review-4608521)almost 6 years ago

 ![Apurva R.](/assets/transparent-ad5be28fbcd25b7b08d2cebe1d957125437fb5407d75ee717965ad22c8808791.gif "Apurva R.")
AR

Reviewed by [Apurva R.](https://www.g2.com/users/460aa0e6-d129-4162-9d86-db8b34142e54)

Associate Consultant | Enterprise (\> 1000 emp.)

* * *

Rating: 5.0 out of 5

5/5

"Unit Testing made easy by Mockito"

Mockito offers best platform for easy usage. I can easily mock an object if I need to test some methods of a class and not the whole. It ease to use made my coding life easy.

[
Read full review
](https://www.g2.com/products/mockito/reviews/mockito-review-4564280)almost 6 years ago

Reviewed by Verified User

Mid-Market (51-1000 emp.)

* * *

Rating: 5.0 out of 5

5/5

"I have been using Mockito for last 8+ years in JEE development. Mockito is in all Junit test."

Mocking underlying database or service,

[
Read full review
](https://www.g2.com/products/mockito/reviews/mockito-review-4543053)almost 6 years ago

User Insights

**Reviewers' Company Size**

Small-Business(50 or fewer emp.)
33.3%

Mid-Market(51-1000 emp.)
50.0%

Enterprise(\> 1000 emp.)
16.7%

Small-Business(50 or fewer emp.)
33.3%

Mid-Market(51-1000 emp.)
50.0%

Enterprise(\> 1000 emp.)
16.7%

Small-Business(50 or fewer emp.)
27.8%

Mid-Market(51-1000 emp.)
38.9%

Enterprise(\> 1000 emp.)
33.3%

Small-Business(50 or fewer emp.)
27.8%

Mid-Market(51-1000 emp.)
38.9%

Enterprise(\> 1000 emp.)
33.3%

**Reviewers' Industry**

[![Apache Shiro](https://images.g2crowd.com/uploads/product/image/thumb_square/thumb_square_b350900e1c1cde239f398145fc13d8f3/apache-shiro.jpg "Apache Shiro")](https://www.g2.com/products/apache-shiro/reviews)
Apache Shiro

Computer Software
41.7%

Information Technology and Services
16.7%

Retail
8.3%

Pharmaceuticals
8.3%

Hospital & Health Care
8.3%

Other
16.7%

[![Mockito](https://images.g2crowd.com/uploads/product/image/thumb_square/thumb_square_68aca30a16b268e2d022e89df6db7656/mockito.png "Mockito")](https://www.g2.com/products/mockito/reviews)
Mockito

Information Technology and Services
22.2%

Computer Software
22.2%

Financial Services
11.1%

Military
5.6%

Marketing and Advertising
5.6%

Other
33.3%

Alternatives

**Apache Shiro Alternatives**

 ![spring.io](https://images.g2crowd.com/uploads/product/hd_favicon/13b10fbf78fe0ef9bab8268eb1f3d7aa/spring-io.svg "spring.io")

[
spring.io
](/products/spring-io/reviews)

 ![JHipster](https://images.g2crowd.com/uploads/product/image/thumb_square/thumb_square_95c64c1be649c4ad42eba5485d80e94a/jhipster.png "JHipster")

[
JHipster
](/products/jhipster/reviews)

 ![Grails](https://images.g2crowd.com/uploads/product/image/thumb_square/thumb_square_36f1bae8310bb7a2f8417ff867932e4a/grails.png "Grails")

[
Grails
](/products/grails/reviews)

 ![Vaadin](https://images.g2crowd.com/uploads/product/hd_favicon/3eafadce7e5a72d053cf43e5a41bce36/vaadin%282%29.svg "Vaadin")

[
Vaadin
](/products/vaadin/reviews)

**Mockito Alternatives**

 ![spring.io](https://images.g2crowd.com/uploads/product/hd_favicon/13b10fbf78fe0ef9bab8268eb1f3d7aa/spring-io.svg "spring.io")

[
spring.io
](/products/spring-io/reviews)

 ![JHipster](https://images.g2crowd.com/uploads/product/image/thumb_square/thumb_square_95c64c1be649c4ad42eba5485d80e94a/jhipster.png "JHipster")

[
JHipster
](/products/jhipster/reviews)

 ![Grails](https://images.g2crowd.com/uploads/product/image/thumb_square/thumb_square_36f1bae8310bb7a2f8417ff867932e4a/grails.png "Grails")

[
Grails
](/products/grails/reviews)

 ![Spark](https://images.g2crowd.com/uploads/product/hd_favicon/1487566689/apache-spark.png "Spark")

[
Spark
](/products/apache-spark/reviews)

## Apache Shiro vs Mockito

- Reviewers felt that Apache Shiro meets the needs of their business better than Mockito.
- When comparing quality of ongoing product support, reviewers felt that Mockito is the preferred option.
- For feature updates and roadmaps, our reviewers preferred the direction of Apache Shiro over Mockito.