diff --git a/Java/README.md b/Java/README.md
index 4feae1b7..da5135ae 100644
--- a/Java/README.md
+++ b/Java/README.md
@@ -1,4 +1,4 @@
-
How to Run Tests:
+How to Run Tests
- CLI - gradlew :cleanTest :test --tests "com.gildedrose.GildedRoseTest.foo"
- Intellij
@@ -8,3 +8,153 @@
+
+The System
+
+ -
+ All items have a SellIn value which denotes the number of days we
+ have to sell the item.
+
+ - All items have a Quality value which denotes how valuable the item is.
+ - At the end of each day our system lowers both values for every item.
+
+
+New Requisites
+
+ - Once the sell by date has passed, Quality degrades twice as fast
+ - The Quality of an item is never negative
+ - "Aged Brie" actually increases in Quality the older it gets
+ - The Quality of an item is never more than 50
+ - "Sulfuras", being a legendary item, never has to be sold or decreases in Quality
+ - "Backstage passes", like aged brie, increases in Quality as its SellIn value approaches;
+ - Quality increases by 2 when there are 10 days or less and by 3 when there are 5 days or less but
+ - Quality drops to 0 after the concert
+ - Conjured" items degrade in Quality twice as fast as normal items
+
+
+Restrictions
+
+ - Do not alter the Item class or Items property
+ -
+ An item can never have its Quality increase above 50, however "Sulfuras" is a
+ legendary item and as such its Quality is 80 and it never alters.
+
+
+
+Original Output
+
+OMGHAI!
+-------- day 0 --------
+
+
+
+ | name |
+ sellIn |
+ quality |
+
+
+
+
+ | +5 Dexterity Vest |
+ 10 |
+ 20 |
+
+
+ | Aged Brie |
+ 2 |
+ 0 |
+
+
+ | Elixir of the Mongoose |
+ 5 |
+ 7 |
+
+
+ | Sulfuras, Hand of Ragnaros |
+ 0 |
+ 80 |
+
+
+ | Sulfuras, Hand of Ragnaros |
+ -1 |
+ 80 |
+
+
+ | Backstage passes to a TAFKAL80ETC concert |
+ 15 |
+ 20 |
+
+
+ | Backstage passes to a TAFKAL80ETC concert |
+ 10 |
+ 49 |
+
+
+ | Backstage passes to a TAFKAL80ETC concert |
+ 5 |
+ 49 |
+
+
+ | Conjured Mana Cake |
+ 3 |
+ 6 |
+
+
+
+-------- day 1 --------
+
+
+
+ | name |
+ sellIn |
+ quality |
+
+
+
+
+ | +5 Dexterity Vest |
+ 9 |
+ 19 |
+
+
+ | Aged Brie |
+ 1 |
+ 1 |
+
+
+ | Elixir of the Mongoose |
+ 4 |
+ 6 |
+
+
+ | Sulfuras, Hand of Ragnaros |
+ 0 |
+ 80 |
+
+
+ | Sulfuras, Hand of Ragnaros |
+ -1 |
+ 80 |
+
+
+ | Backstage passes to a TAFKAL80ETC concert |
+ 14 |
+ 21 |
+
+
+ | Backstage passes to a TAFKAL80ETC concert |
+ 9 |
+ 50 |
+
+
+ | Backstage passes to a TAFKAL80ETC concert |
+ 4 |
+ 50 |
+
+
+ | Conjured Mana Cake |
+ 2 |
+ 5 |
+
+
+
\ No newline at end of file
diff --git a/Java/src/test/java/com/gildedrose/GildedRoseTest.java b/Java/src/test/java/com/gildedrose/GildedRoseTest.java
index 8ae29eec..9e61b788 100644
--- a/Java/src/test/java/com/gildedrose/GildedRoseTest.java
+++ b/Java/src/test/java/com/gildedrose/GildedRoseTest.java
@@ -2,16 +2,26 @@ package com.gildedrose;
import org.junit.jupiter.api.Test;
+import java.util.stream.IntStream;
+
import static org.junit.jupiter.api.Assertions.assertEquals;
class GildedRoseTest {
@Test
- void foo() {
- Item[] items = new Item[] { new Item("foo", 0, 0) };
- GildedRose app = new GildedRose(items);
- app.updateQuality();
- assertEquals("fixme", app.items[0].name);
- }
+ void dexterityVestShouldDecreaseSellInAndQualityEachUpdate() {
+ String name = "+5 Dexterity Vest";
+ int sellIn = 10;
+ int quality = 20;
+ int days = 2;
+ Item[] items = new Item[]{new Item(name, sellIn, quality)};
+ GildedRose app = new GildedRose(items);
+ IntStream.rangeClosed(1, days).forEach(index -> {
+ app.updateQuality();
+ assertEquals(name, app.items[0].name);
+ assertEquals(sellIn - index, app.items[0].sellIn);
+ assertEquals(quality - index, app.items[0].quality);
+ });
+ }
}