Fixed not serializable error when stopping/starting Tomcat

This commit is contained in:
Nanne Baars
2015-08-22 10:40:42 +02:00
parent 16c262f3bc
commit 69350a6e0c
2 changed files with 39 additions and 5 deletions

View File

@ -0,0 +1,26 @@
package org.owasp.webgoat.util;
import org.junit.Test;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;
public class LabelManagerImplTest {
@Test
public void shouldSerialize() throws IOException {
LabelManagerImpl labelManager = new LabelManagerImpl(null);
ByteArrayOutputStream bos = new ByteArrayOutputStream();
ObjectOutputStream out = new ObjectOutputStream(bos);
out.writeObject(labelManager);
}
@Test
public void shouldSerializeWithLabelProvider() throws IOException {
LabelManagerImpl labelManager = new LabelManagerImpl(new LabelProvider());
ByteArrayOutputStream bos = new ByteArrayOutputStream();
ObjectOutputStream out = new ObjectOutputStream(bos);
out.writeObject(labelManager);
}
}