@@ -0,0 +1,1309 @@
+package com.insightfullogic.java8.examples.chapter5;%0A%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0Aimport static org.junit.Assert.*;%0A%0Apublic class StringCombinerTest %7B%0A    private StringCombiner combiner;%0A%0A    @Before%0A    public void before() %7B%0A        this.combiner = new StringCombiner(%22, %22, %22%5B%22, %22%5D%22);%0A%0A        combiner.add(%22A%22).add(%22B%22).add(%22C%22).add(%22D%22);%0A    %7D%0A%0A    @Test%0A    public void add() throws Exception %7B%0A        assertEquals(%22%5BA, B, C, D%5D%22, combiner.toString());%0A    %7D%0A%0A    @Test%0A    public void mergeWithOther() throws Exception %7B%0A        StringCombiner other = new StringCombiner(%22, %22, %22%5B%22, %22%5D%22);%0A%0A        other.add(%22E%22).add(%22F%22).add(%22G%22);%0A%0A        this.combiner.merge(other);%0A%0A        assertEquals(%22%5BA, B, C, D, E, F, G%5D%22, this.combiner.toString());%0A    %7D%0A%0A    @Test%0A    public void mergeWithEmpty() %7B%0A        this.combiner.merge(new StringCombiner(%22, %22, %22%5B%22, %22%5D%22));%0A%0A        assertEquals(%22%5BA, B, C, D%5D%22, this.combiner.toString());%0A    %7D%0A%0A    @Test%0A    public void mergeSelf() throws Exception %7B%0A        assertEquals(%22%5BA, B, C, D%5D%22, this.combiner.merge(this.combiner).toString());%0A    %7D%0A%0A    @Test%0A    public void twiceCallToString() throws Exception %7B%0A        assertEquals(%22%5BA, B, C, D%5D%22, this.combiner.toString());%0A        assertEquals(%22%5BA, B, C, D%5D%22, this.combiner.toString());%0A    %7D%0A%7D

Add test case for StringCombiner