Understanding Zero-day Exploit of Log4j Security Vulnerability and Solution (CVE-2021-44228, CVE-2021-45046)
Introduction On 9th December 2021, an industry-wide vulnerability was discovered…
July 22, 2017
Its good to write unit tests cases, and this part is mostly forgotten by developers. It can ease various issues that can come up while integrations.
I’m listing down various issues or problems that we faced while writing JUnit test cases:
This is the issue you face when somewhere in your dependency you are using a component whose mock is not supported by mock libraries. Or, mock libraries can not mock a class.
In this case, the solution is to tell PowerMock that please ignore particular package to mock. We are asking mock loader not to load particular package/classes.
And, you can do this by putting an annotation on top of class like below:
@PowerMockIgnore("javax.management.*")
And, next time you run, the issue is gone. Enjoy
Introduction On 9th December 2021, an industry-wide vulnerability was discovered…
This post is dedicated for cases where we intend to append a variable value in a…
Curl is a wonderful tool for initiate REST APIs or calls. Or, you can literally…
See the code below: The output will be 4 columns separated by comma. You can…
Read file all in one shot Above code read whole file at once, but if the files…
If you are using Bootstrap, the default font that comes with the package is…
Introduction This post has the complete code to send email through smtp server…
Introduction In a normal email sending code from python, I’m getting following…
Introduction In one of my app, I was using to talk to . I have used some event…
Introduction So you have a Django project, and want to run it using docker image…
Introduction It is very important to introduce few process so that your code and…
Introduction In this post, we will see a sample Jenkin Pipeline Groovy script…