  @Test
  public void testDefaultElementNotDefined() {

    when( cpkApi.coreService.getDefaultElement() ).thenReturn( null );
    Response responseResult = null;
    try {
      responseResult = cpkApi.defaultElement();
      assertEquals( Response.Status.OK.getStatusCode(), responseResult.getStatus() );
      assertEquals( cpkApi.DEFAULT_NO_DASHBOARD_MESSAGE, new String( (byte[]) responseResult.getEntity() ) );
    } catch ( IOException ex ) {
      ex.printStackTrace();
    }
    assertNotNull( responseResult );
  }