	@Test
	public void testStorageProbasOneParent() {

		
		
		NodeCategorical nGender = new NodeCategorical(null, "gender");
		nGender.addDomain("male", "female");
		
		nGender.setProbabilities(0.55, "male");
		nGender.setProbabilities(0.45, "female");

		assertEquals(0.55, nGender.getProbability("male"), 1e-5);
		assertEquals(0.45, nGender.getProbability("female"), 1e-5);
		
		assertEquals(0.55, nGender.getConditionalProbability("male"), 1e-5);
		assertEquals(0.45, nGender.getConditionalProbability("female"), 1e-5);

		assertTrue("CPT should be valid", nGender.isValid());
		
		NodeCategorical nAge = new NodeCategorical(null, "age");
		nAge.addParent(nGender);
		nAge.addDomain("<15", ">=15");
		
		try {
			nAge.setProbabilities(0.55, "<15");
			fail("invalid argument exception expected");
		} catch (IllegalArgumentException e) {
		}

		nAge.setProbabilities(0.55, "<15", "gender", "male");
		nAge.setProbabilities(0.45, ">=15", "gender", "male");
		nAge.setProbabilities(0.50, "<15", "gender", "female");
		nAge.setProbabilities(0.50, ">=15", "gender", "female");

		assertEquals(0.50, nAge.getProbability("<15","gender","female"), 1e-5);
		assertEquals(0.55, nAge.getProbability("<15","gender","male"), 1e-5);

		assertTrue("CPT should be valid", nAge.isValid());		
	}