package github.pasiahopelto.scorelib.model;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.meanbean.test.BeanTester;
import org.meanbean.test.EqualsMethodTester;
import org.meanbean.test.HashCodeMethodTester;
import org.mockito.runners.MockitoJUnitRunner;

import static org.junit.Assert.*;

import java.io.Serializable;

@RunWith(MockitoJUnitRunner.class)
public class TestVote {

	@Test
	public void testBean() {
		new BeanTester().testBean(Vote.class);
		new EqualsMethodTester().testEqualsMethod(Vote.class);
		new HashCodeMethodTester().testHashCodeMethod(Vote.class);
	}

	@Test
	public void isSerializable() {
		assertTrue(new Vote() instanceof Serializable);
	}
}

@@ -94,16 +94,99 @@
 unWith;%0A
+import org.meanbean.factories.FactoryCollection;%0Aimport org.meanbean.lang.Factory;%0A
 import o
@@ -206,32 +206,32 @@
 est.BeanTester;%0A
-
 import org.meanb
@@ -518,162 +518,941 @@
 %7B%0A%09%09
-new BeanTester().testBean(Vote.class);%0A%09%09new EqualsMethodTester().testEqualsMethod(Vote.class);%0A%09%09new HashCodeMethodTester().testHashCodeMethod(Vote.class
+BeanTester beanTester = new BeanTester();%0A%09%09addFactories(beanTester.getFactoryCollection());%0A%09%09beanTester.testBean(Vote.class);%0A%09%7D%0A%0A%09@Test%0A%09public void testEqualsMethod() %7B%0A%09%09EqualsMethodTester equalsMethodTester = new EqualsMethodTester();%0A%09%09addFactories(equalsMethodTester.getFactoryCollection());%0A%09%09equalsMethodTester.testEqualsMethod(Vote.class);%0A%09%7D%0A%0A%09@Test%0A%09public void testHashCodeMethod() %7B%0A%09%09HashCodeMethodTester hashCodeMethodTester = new HashCodeMethodTester();%0A%09%09addFactories(hashCodeMethodTester.getFactoryCollection());%0A%09%09hashCodeMethodTester.testHashCodeMethod(Vote.class);%0A%09%7D%0A%0A%09private void addFactories(FactoryCollection factoryCollection) %7B%0A%09%09factoryCollection.addFactory(Candidate.class, new Factory%3CCandidate%3E() %7B%0A%09%09%09public Candidate create() %7B%0A%09%09%09%09return new Candidate();%0A%09%09%09%7D%0A%09%09%7D);%0A%09%09factoryCollection.addFactory(Voting.class, new Factory%3CVoting%3E() %7B%0A%09%09%09public Voting create() %7B%0A%09%09%09%09return new Voting();%0A%09%09%09%7D%0A%09%09%7D
 );%0A%09

fix vote test's warnings