How to cover a method calling a static method using JUnit mocking?
<p>Consider two classes <code>A</code> and <code>B</code>.</p>

<pre><code>class A {  static int a(){} }

class B {  void something(){ int value=A.a(); .......}}
</code></pre>

<p>Now I have to cover class <code>B</code> using Junit Test case and hence I create a new class (class <code>TestB</code>) to cover the class <code>B</code>.</p>

<pre><code>class TestB {  @Test  public void testsomething(){...} }
</code></pre>

<p>Here my question is if there is any way I can cover the line <code>A.a()</code> as this is the static method. I know that I can't easy mock it because there is no object involved. So how would I proceed?
I am using JUnit and EasyMock.</p>