Skip to content

Instantly share code, notes, and snippets.

@dkincaid
Created August 6, 2012 19:08
Show Gist options
  • Save dkincaid/3277619 to your computer and use it in GitHub Desktop.
Save dkincaid/3277619 to your computer and use it in GitHub Desktop.
Fixed mutable state test
@Test
public void changeNameTest() {
MutableClass original_name = new MutableClass("my name");
MutableClass expected_name = new MutableClass("my name");
NameFilter filter = new NameFilter();
MutableClass new_name = filter.changeName(original_name,
"new name");
assertEquals(new_name, expected_name);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment