Skip to content

Instantly share code, notes, and snippets.

Created December 30, 2018 11:53
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save priort/492c1ce647ff92162ab1b93810c09d84 to your computer and use it in GitHub Desktop.
public class JazzBandTest {
public void bandCreatesMusicianWithAccessToBandSetList() {
List setList = Arrays.asList("Donna Lee", "Dig");
JazzBand theBop5 = new JazzBand(setList);
JazzBand.Musician tom = theBop5.createMusician();
assertTrue(setList == tom.getBandSetList());
public class JazzBand {
private List setList;
public JazzBand(List setList) {
this.setList = setList;
public Musician createMusician() {
return new Musician();
public class Musician {
private Musician() {}
public List getBandSetList() {
return setList;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment