CoView Editor Decorators and Options

Mock Decorators

CoView Mock This decorator identifies mockable invocations. A JUnit test must be created before you can create a mock. To create a mock object for this invocation:

  • 1. Click on the decorator and select Mock ...
  • 2. Click on the decorator and select 'Ignore ...'. This will create a Javadoc for the method and remove the decorator (Note this has to be done for all reported metrics)
  • 3. Increase the metric threshold or change the severity level
  • CoView Warning Decorator This decorator notifies the user that the method exceeded the threshold for at least one metric with a severity of warning.

  • You have three options to resolve this:
    • 1. Refactor the code to reduce the metric value
    • 2. Click on the decorator and select 'Ignore ...'. This will create a Javadoc for the method and remove the decorator (Note this has to be done for all reported metrics)
    • 3. Increase the metric threshold or change the severity level

    Testability Decorators

    CoView Error Decorator This decorator notifies the user that the method exceeded the threshold for at least one metric which has a severity level of error.


  • This decorator will prevent code from compiling until it is resolved. You have three options to resolve this:

    • 1. Refactor the code to reduce the metric value
    • 2. Click on the decorator and select 'Ignore ...'. This will create a Javadoc for the method and remove the decorator (Note this has to be done for all reported metrics)
    • 3. Increase the metric threshold or change the severity level

    CoView Warning Decorator This decorator notifies the user that the method exceeded the threshold for at least one metric with a severity of warning.

  • You have three options to resolve this:
    • 1. Refactor the code to reduce the metric value
    • 2. Click on the decorator and select 'Ignore ...'. This will create a Javadoc for the method and remove the decorator (Note this has to be done for all reported metrics)
    • 3. Increase the metric threshold or change the severity level