• Private Policy
  • Contact
Follow me
  • English
  • Tiếng Việt
Huong Dan Java
  • Java
    • Java Core
    • Java Lambda Expression
    • Java Fundamentals
    • Java Stream
    • Java Tools
    • Java XML
  • Jakarta EE
    • CDI
    • JSON Binding
    • JSON Processing
    • MVC
    • Persistence
    • RESTful Web Services
    • Servlet
  • Frameworks
    • Apache Camel
    • Apache Struts
    • Javalin
    • gRPC
    • Hibernate
    • Micronaut
    • MicroProfile
    • Mule Enterprise Service Bus
    • OpenId Connect
    • Quarkus
    • Spring
      • Spring AI
      • Spring Authorization Server
      • Spring Boot
      • Spring Cloud Gateway
      • Spring Cloud GCP
      • Spring Cloud Netflix
      • Spring Data JPA
      • Spring Data MongoDB
      • Spring Data R2DBC
      • Spring for Apache Kafka
      • Spring GraphQL
      • Spring Framework
      • Spring Integration
      • Spring MVC
      • Spring Security
      • Spring Session
      • Spring WebFlux
      • Spring WebSocket
    • Spark
    • Vaadin
  • Libraries
    • Apache
      • Apache ActiveMQ
      • Apache Commons IO
      • Apache FreeMarker
      • Apache HTTP Components
      • Apache Ignite
      • Apache Tiles
    • AspectJ
    • Database Migration
    • EhCache
    • GraphQL
    • Jackson
    • JSch
    • Log4J
    • Project Lombok
    • Project Reactor
    • Quartz Scheduler
    • Thymeleaf
    • Resilience4j
    • RxJava
  • Testing
    • Mockito
    • PowerMock
    • Selenium
    • Testcontainers
  • Open Source
    • Apache APISIX
    • Apache Kafka
    • Debezium
    • Distributed Application Runtime
    • Grafana
    • Keycloak
    • Prometheus
    • RabbitMQ
    • Redis
    • SonarQube
  • DevOps
    • Cloud Foundry
    • Cloud Provider
      • Google Cloud Platform
    • Docker
    • Helm
    • Kubernetes
    • Jenkins
    • Nexus Repository Manager
    • OpenShift
  • Tool
    • Apache Ant
    • Apache Maven
    • CVS
    • Eclipse
    • FTP
    • IntelliJ
    • Git
    • Nginx
    • OpenAPI
    • RAML
  • Database
    • MongoDB
    • MySQL
    • PostgreSQL
  • Server Runtime
    • Apache Tomcat
    • JBoss WildFly
  • Others
    • JavaScript
    • Huong Dan Java Logger
    • Algorithm
    • mvnForum
    • Questions Management
      • Questions Management – Stage 1
      • Questions Management – Stage 2
  • Books

Mockito

Inject Mock object using @InjectMocks annotation of Mockito

Inject Mock object using @InjectMocks annotation of Mockito

7 years ago by Khanh NguyenMockito

In the previous tutorial, we passed the Mock object to the class which we are writing the Unit Test using the Setter method of this class. However, in case you are using the Spring framework in your application, the dependent objects are injected into the… Read More

Initialize Mock object using @Mock annotation of Mockito

Initialize Mock object using @Mock annotation of Mockito

7 years ago by Khanh NguyenMockito

In the previous tutorial Overview about Mock in Unit Test, I introduced you all a way to mock an object using the Mockito class. Mockito also supports us another way to initialize the Mock object using @Mock annotation. How is it in details? Let’s find… Read More

Overview about Mock in Unit Test

Overview about Mock in Unit Test

7 years ago by Khanh NguyenMockito

Unit Test is a tool that helps us to ensure that the code we write, reflects what we want accurately. In the process of working with the Unit Test, one of the problems we often encounter is that our code will call the methods of… Read More

Spring Authorization Server Ebook

Search Google


Announcement

  • Contact Form error should be fixed(20 July, 2021)

Most Viewed

  • Install Node.js on macOS (443,660)
  • Contact (71,525)
  • Push a local GIT repository into a remote GIT repository (60,885)
  • Ignore case sensitive for table name in JPA with Hibernate implementation (36,108)
  • Access HttpServletRequest and HttpServletResponse in Spring MVC controller (33,554)
  • Implement OAuth Authorization Server using Spring Authorization Server (32,346)
  • Some ways to initialize Optional object in Java (28,048)
  • Get base URL in Controller in Spring MVC and Spring Boot (27,919)
  • Get access token using refresh token with Keycloak (24,795)
  • mvnForum 0.0.4 released (23,762)

Recent Comments

  • Raj on Generate JSON data using Java class annotated with JAXB annotation, using Jackson library
  • khoannh on Git
  • Maxi on Configure Web Origin in Keycloak
  • Binod on Store RegisteredClient to database in Spring Authorization Server
  • Khanh Nguyen on “Spring Authorization Server – From the basics – Second Edition” Book

Links

  • Huong Dan Kotlin

Twitter

Follow @KhanhNguyenJ
  • Private Policy
  • Contact
Theme: GoMedia by ThemeJunkie. Back To Top