@@ -0,0 +1,1603 @@
+package com.iluwatar.builder;%0A%0Aimport org.junit.Test;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertNotNull;%0A%0A/**%0A * Date: 12/6/15 - 11:01 PM%0A *%0A * @author Jeroen Meulemeester%0A */%0Apublic class HeroTest %7B%0A%0A  /**%0A   * Test if we get the expected exception when trying to create a hero without a profession%0A   */%0A  @Test(expected = IllegalArgumentException.class)%0A  public void testMissingProfession() throws Exception %7B%0A    new Hero.HeroBuilder(null, %22Sir without a job%22);%0A  %7D%0A%0A  /**%0A   * Test if we get the expected exception when trying to create a hero without a name%0A   */%0A  @Test(expected = IllegalArgumentException.class)%0A  public void testMissingName() throws Exception %7B%0A    new Hero.HeroBuilder(Profession.THIEF, null);%0A  %7D%0A%0A  /**%0A   * Test if the hero build by the builder has the correct attributes, as requested%0A   */%0A  @Test%0A  public void testBuildHero() throws Exception %7B%0A    final String heroName = %22Sir Lancelot%22;%0A%0A    final Hero hero = new Hero.HeroBuilder(Profession.WARRIOR, heroName)%0A        .withArmor(Armor.CHAIN_MAIL)%0A        .withWeapon(Weapon.SWORD)%0A        .withHairType(HairType.LONG_CURLY)%0A        .withHairColor(HairColor.BLOND)%0A        .build();%0A%0A    assertNotNull(hero);%0A    assertNotNull(hero.toString());%0A    assertEquals(Profession.WARRIOR, hero.getProfession());%0A    assertEquals(heroName, hero.getName());%0A    assertEquals(Armor.CHAIN_MAIL, hero.getArmor());%0A    assertEquals(Weapon.SWORD, hero.getWeapon());%0A    assertEquals(HairType.LONG_CURLY, hero.getHairType());%0A    assertEquals(HairColor.BLOND, hero.getHairColor());%0A%0A  %7D%0A%0A%7D

Add proper unit tests for builder pattern #293