diff --git a/pom.xml b/pom.xml
index d13bd84ae6504c06ed80f18d3f0b7cb2513105c4..d9cbb308004256256528d1e2a4c2b792dba44733 100644
--- a/pom.xml
+++ b/pom.xml
@@ -91,6 +91,13 @@
 			<version>4.11</version>
 			<scope>test</scope>
 		</dependency>
+		<!-- FEST for fluent test assertions -->
+		<dependency>
+			<groupId>org.easytesting</groupId>
+			<artifactId>fest-assert-core</artifactId>
+			<version>2.0M10</version>
+			<scope>test</scope>
+		</dependency>
 	</dependencies>
 
 	<profiles>
diff --git a/xchart/src/main/java/com/xeiam/xchart/Histogram.java b/xchart/src/main/java/com/xeiam/xchart/Histogram.java
index ffd99ce7103c07f3579a4b24b2d7b9d064fbd7c0..fa307af367129efd619afa36deb23b0f3b616a92 100644
--- a/xchart/src/main/java/com/xeiam/xchart/Histogram.java
+++ b/xchart/src/main/java/com/xeiam/xchart/Histogram.java
@@ -22,7 +22,7 @@ import java.util.List;
 
 /**
  * This class can be used to create histogram data for histogram bar charts
- * 
+ *
  * @author timmolter
  */
 public class Histogram {
@@ -36,7 +36,7 @@ public class Histogram {
 
   /**
    * Constructor
-   * 
+   *
    * @param data
    * @param numBins
    */
@@ -64,7 +64,7 @@ public class Histogram {
 
   /**
    * Constructor
-   * 
+   *
    * @param data
    * @param numBins
    * @param min
@@ -89,16 +89,15 @@ public class Histogram {
     Iterator<? extends Number> itr = originalData.iterator();
     while (itr.hasNext()) {
 
-      int bin = (int) ((((Number) itr.next()).doubleValue() - min) / binSize); // changed this from numBins
+      double doubleValue = ((Number) itr.next()).doubleValue();
+      int bin = (int) ((doubleValue - min) / binSize); // changed this from numBins
       if (bin < 0) { /* this data is smaller than min */
         // System.out.println("less than");
-      }
-      else if (bin > numBins) { /* this data point is bigger than max */
+      } else if (doubleValue == max) { // the value falls exactly on the max value
+        tempYAxisData[bin - 1] += 1;
+      } else if (bin > numBins || bin == numBins) { /* this data point is bigger than max */
         // System.out.println("greater than");
-      }
-      else if (bin == numBins) { // this falls on the next bin of the max bin
-      }
-      else {
+      } else {
         tempYAxisData[bin] += 1;
       }
     }
diff --git a/xchart/src/test/java/com/xeiam/xchart/DateFormatterTest.java b/xchart/src/test/java/com/xeiam/xchart/DateFormatterTest.java
index db70248ccc5b99152346f7ca72005c0a884e8d14..5e9e63e2e2d8a4819db749ea00423add6231cdb9 100644
--- a/xchart/src/test/java/com/xeiam/xchart/DateFormatterTest.java
+++ b/xchart/src/test/java/com/xeiam/xchart/DateFormatterTest.java
@@ -15,8 +15,7 @@
  */
 package com.xeiam.xchart;
 
-import static org.hamcrest.CoreMatchers.equalTo;
-import static org.hamcrest.MatcherAssert.assertThat;
+import static org.fest.assertions.api.Assertions.assertThat;
 
 import java.util.Locale;
 import java.util.TimeZone;
@@ -51,7 +50,7 @@ public class DateFormatterTest {
     long gridStepHint = (long) (span / 1000 * 74);
     long timeUnit = dateFormatter.getTimeUnit(gridStepHint);
     String stringValue = dateFormatter.formatDate(value, timeUnit);
-    assertThat(stringValue, equalTo("05.531"));
+    assertThat(stringValue).isEqualTo("05.531");
 
     // sec
     value = 1358108105000L;
@@ -61,7 +60,7 @@ public class DateFormatterTest {
     gridStepHint = (long) (span / 1000 * 74);
     timeUnit = dateFormatter.getTimeUnit(gridStepHint);
     stringValue = dateFormatter.formatDate(value, timeUnit);
-    assertThat(stringValue, equalTo("05.000"));
+    assertThat(stringValue).isEqualTo("05.000");
 
     // min
     value = 1358111750000L;
@@ -71,7 +70,7 @@ public class DateFormatterTest {
     gridStepHint = (long) (span / 1000 * 74);
     timeUnit = dateFormatter.getTimeUnit(gridStepHint);
     stringValue = dateFormatter.formatDate(value, timeUnit);
-    assertThat(stringValue, equalTo("15:50"));
+    assertThat(stringValue).isEqualTo("15:50");
 
     // hour
     value = 1358111870000L;
@@ -81,7 +80,7 @@ public class DateFormatterTest {
     gridStepHint = (long) (span / 1000 * 74);
     timeUnit = dateFormatter.getTimeUnit(gridStepHint);
     stringValue = dateFormatter.formatDate(value, timeUnit);
-    assertThat(stringValue, equalTo("21:17"));
+    assertThat(stringValue).isEqualTo("21:17");
 
     // day
     value = 1358112317000L;
@@ -91,7 +90,7 @@ public class DateFormatterTest {
     gridStepHint = (long) (span / 1000 * 74);
     timeUnit = dateFormatter.getTimeUnit(gridStepHint);
     stringValue = dateFormatter.formatDate(value, timeUnit);
-    assertThat(stringValue, equalTo("21:25"));
+    assertThat(stringValue).isEqualTo("21:25");
 
     // week
     value = 1358112317000L;
@@ -101,7 +100,7 @@ public class DateFormatterTest {
     gridStepHint = (long) (span / 1000 * 74);
     timeUnit = dateFormatter.getTimeUnit(gridStepHint);
     stringValue = dateFormatter.formatDate(value, timeUnit);
-    assertThat(stringValue, equalTo("01-13"));
+    assertThat(stringValue).isEqualTo("01-13");
 
     // month
     value = 1358112838000L;
@@ -111,7 +110,7 @@ public class DateFormatterTest {
     gridStepHint = (long) (span / 1000 * 74);
     timeUnit = dateFormatter.getTimeUnit(gridStepHint);
     stringValue = dateFormatter.formatDate(value, timeUnit);
-    assertThat(stringValue, equalTo("01-13"));
+    assertThat(stringValue).isEqualTo("01-13");
 
     // year
     value = 1358113402000L;
@@ -121,7 +120,7 @@ public class DateFormatterTest {
     gridStepHint = (long) (span / 1000 * 74);
     timeUnit = dateFormatter.getTimeUnit(gridStepHint);
     stringValue = dateFormatter.formatDate(value, timeUnit);
-    assertThat(stringValue, equalTo("2013-01"));
+    assertThat(stringValue).isEqualTo("2013-01");
 
   }
 
diff --git a/xchart/src/test/java/com/xeiam/xchart/HistogramTest.java b/xchart/src/test/java/com/xeiam/xchart/HistogramTest.java
new file mode 100644
index 0000000000000000000000000000000000000000..ebe3a080c2b43e52765122ecd8e418a1d24b67da
--- /dev/null
+++ b/xchart/src/test/java/com/xeiam/xchart/HistogramTest.java
@@ -0,0 +1,44 @@
+/**
+ * Copyright 2013 Xeiam LLC.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.xeiam.xchart;
+
+import static org.fest.assertions.api.Assertions.assertThat;
+
+import java.util.Arrays;
+
+import org.junit.Test;
+
+/**
+ * @author timmolter
+ */
+public class HistogramTest {
+
+  @Test
+  public void test1() {
+
+    Histogram histogram = new Histogram(Arrays.asList(1, 2, 3, 4, 5, 6), 2, 0, 4);
+
+    assertThat(histogram.getMax()).isEqualTo(4.0);
+    assertThat(histogram.getMin()).isEqualTo(0.0);
+    assertThat(histogram.getNumBins()).isEqualTo(2);
+    assertThat(histogram.getyAxisData().get(0) + histogram.getyAxisData().get(1)).isEqualTo(4);
+
+    //    Chart chart = new ChartBuilder().chartType(ChartType.Bar).width(800).height(600).build();
+    //    chart.addSeries("histogram 1", histogram.getxAxisData(), histogram.getyAxisData());
+    //    new SwingWrapper(chart).displayChart();
+
+  }
+}