/**
 * Copyright (C) 2010-2011 LShift Ltd.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package net.lshift.diffa.participant.changes;

import org.junit.Test;
import static org.junit.Assert.*;

public class ChangeEventTest {

  @Test
  public void shouldRejectMissingMandatoryFields() {
    ChangeEvent bogusEvent = new ChangeEvent();
    assertFalse(bogusEvent.containsMandatoryFields());
  }

  @Test
  public void shouldAcceptMinimumFields() {
    ChangeEvent validEvent = new ChangeEvent();
    validEvent.setId("id");
    validEvent.setVersion("vsn");
    assertTrue(validEvent.containsMandatoryFields());
  }
}

@@ -672,16 +672,196 @@
 t.Test;%0A
+import org.junit.experimental.theories.DataPoint;%0Aimport org.junit.experimental.theories.Theories;%0Aimport org.junit.experimental.theories.Theory;%0Aimport org.junit.runner.RunWith;%0A%0A
 import s
@@ -887,16 +887,41 @@
 ert.*;%0A%0A
+@RunWith(Theories.class)%0A
 public c
@@ -951,113 +951,616 @@
 %0A  @
-Test%0A  public void shouldRejectMissingMandatoryFields() %7B%0A    ChangeEvent bogusEvent = new ChangeEvent();
+DataPoint public static ChangeEvent completelyEmptyEvent = new ChangeEvent();%0A  @DataPoint public static ChangeEvent nullIdWithValidVersion = new ChangeEvent(null,%22vsn%22, null, null, null);%0A  @DataPoint public static ChangeEvent emptyIdWithValidVersion = new ChangeEvent(%22%22 ,%22vsn%22, null, null, null);%0A  @DataPoint public static ChangeEvent validIdWithEmptyVersion = new ChangeEvent(%22id%22 , %22%22, null, null, null);%0A  @DataPoint public static ChangeEvent validIdWithNullVersion = new ChangeEvent(%22id%22 , null, null, null, null);%0A%0A  @Theory%0A  public void shouldRejectMissingMandatoryFields(ChangeEvent bogusEvent) %7B
 %0A   

Add some more data points to ChangeEvent check