title: Failure "field should be initialised with an implementing instance of the interface"?
body: <pre><code>    public class Player implements Comparable&lt;Player&gt; {
  
  //Fields
  private Name name;
  private Rollable rollable;
  
  //Constructors
  public Player() {
      name = new Name();
      rollable = new Rollable();
  }
  public Player(Name name) {
      this.name = name;
      rollable = new Rollable();
  }
  public Player(Name name, Rollable rollable) {
      this.name = name;
      this.rollable = rollable;
  }
  </code></pre>
  
  <p>Hello, for my constructors where i have put <code>rollable = new Rollable();</code> I am getting an error which states that it <code>Cannot instantiate the type rollable</code>.
  Below i have added the JUnit test and i will also add the code for the Rollable class</p>
  
  <pre><code>        @Test
  public void testDefaultConstructor() {
      Player p = new Player();
  
      assertEquals("Name field should be initialised with a default Name object ", new Name(), p.
  </code></pre>
  
  <p>getName()); 
          assertTrue("Player's rollable field should be initialised with an.       implementing instance of the Rollable interface", p.getRollable()         instanceof Rollable);
              }</p>
  
  <pre><code>@Test
  public void testCustomConstructor1arg() {
      Name n = new Name("Joe", "Bloggs");
      Player p = new Player(n);
  
      assertSame("Player's name field should be initialised with and      return the same object received by the constructor", n, p.getName()); 
      assertTrue("Player's rollable field should be initialised with an implementing instance of the Rollable interface", p.getRollable() instanceof Rollable);
  }
  </code></pre>
  
  <p>Now below is the JUnit test for the default constructor whcih is also giving me the failure of <code>Players rollable field should be initialised with an implementing instance of the Rollable interface</code>, however, all of my other JUnit tests are passing.</p>
  
  <pre><code>        @Test
  public void testDefaultConstructor() {
      Player p = new Player();
  
      assertEquals("Name field should be initialised with a default Name object ", new Name(), p.getName());
      assertTrue("Player's rollable field should be initialised with an implementing instance of the Rollable interface", p.getRollable() instanceof Rollable);
  }
  </code></pre>
  
  <p>The code for my Rollable class is as below;</p>
  
  <pre><code>    public interface Rollable {
  
  public void roll();
  
  public int getScore();
  </code></pre>
  
  <p>}</p>
  
  <p>The methods for my rollable code are as below;</p>
  
  <pre><code>        //Methods
  public Name getName() {
      return name;
  }
  public void setName(Name name) {
      this.name = name;
  }
  public Rollable getRollable() {
      return rollable;
  }
  public void rollDice() {
      rollable.roll();
  }
  public int getDiceScore() {
      return rollable.getScore();
  }
  </code></pre>
  
  <p>All help will be appreciated as i am struggling with the failures, thank you.</p>