forked from WebGoat/WebGoat
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request WebGoat#36 from nbaars/master
Fixed not serializable error when stopping/starting Tomcat
- Loading branch information
Showing
2 changed files
with
39 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
webgoat-container/src/test/java/org/owasp/webgoat/util/LabelManagerImplTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
} | ||
} |