private void initializeBehaviour() {
   when(mock.findAPreDefinedClassification(anyString(), anyString()))
       .thenReturn(PdcClassification.NONE_CLASSIFICATION);
   when(mock.getPreDefinedClassification(anyString()))
       .thenReturn(PdcClassification.NONE_CLASSIFICATION);
   when(mock.getPreDefinedClassification(anyString(), anyString()))
       .thenReturn(PdcClassification.NONE_CLASSIFICATION);
   when(mock.savePreDefinedClassification(any(PdcClassification.class)))
       .thenAnswer(
           new Answer<PdcClassification>() {
             @Override
             public PdcClassification answer(InvocationOnMock invocation) throws Throwable {
               PdcClassificationService mock = (PdcClassificationService) invocation.getMock();
               PdcClassification classification = (PdcClassification) invocation.getArguments()[0];
               if (classification.getId() != null
                   && classification.isEmpty()
                   && findAPreDefinedClassification(
                           classification.getNodeId(), classification.getComponentInstanceId())
                       != PdcClassification.NONE_CLASSIFICATION) {
                 when(mock.findAPreDefinedClassification(
                         classification.getNodeId(), classification.getComponentInstanceId()))
                     .thenReturn(PdcClassification.NONE_CLASSIFICATION);
                 return PdcClassification.NONE_CLASSIFICATION;
               }
               ValidatorFactory validatorFactory = Validation.buildDefaultValidatorFactory();
               Set<ConstraintViolation<PdcClassification>> violations =
                   validatorFactory.getValidator().validate(classification);
               if (!violations.isEmpty()) {
                 throw new ConstraintViolationException("Error", null);
               }
               ReflectionTestUtils.setField(classification, "id", id++);
               when(mock.findAPreDefinedClassification(
                       classification.getNodeId(), classification.getComponentInstanceId()))
                   .thenReturn(classification);
               if (classification.isPredefinedForANode()) {
                 when(mock.getPreDefinedClassification(
                         classification.getNodeId(), classification.getComponentInstanceId()))
                     .thenReturn(classification);
               } else {
                 when(mock.getPreDefinedClassification(classification.getComponentInstanceId()))
                     .thenReturn(classification);
               }
               return classification;
             }
           });
 }
 @Override
 public PdcClassification savePreDefinedClassification(PdcClassification classification) {
   return mock.savePreDefinedClassification(classification);
 }