@@ -0,0 +1,514 @@
+package com.finance.datamodel;%0D%0A%0D%0Aimport static org.hamcrest.CoreMatchers.is;%0D%0Aimport static org.junit.Assert.assertThat;%0D%0A%0D%0Aimport org.junit.Test;%0D%0A%0D%0Apublic class PercentageTest %7B%0D%0A%0D%0A%09@Test%0D%0A%09public void testPercentageAsValue() %7B%0D%0A%09%09final Percentage percentage = new Percentage(100, 200);%0D%0A%0D%0A%09%09assertThat(percentage.asValue(), is(50D));%0D%0A%09%7D%0D%0A%0D%0A%09@Test%0D%0A%09public void testPercentageAsFactor() %7B%0D%0A%09%09final Percentage percentage = new Percentage(100, 200);%0D%0A%0D%0A%09%09assertThat(percentage.asFactor(), is(0.50));%0D%0A%0D%0A%09%7D%0D%0A%0D%0A%7D%0D%0A

Test for Percentage class