@Test
public void test_getServiceDef() {

	try {
		// if service store returns null or throws an exception then service is deemed invalid
		when(_store.getServiceDefByName("return null")).thenReturn(null);
		when(_store.getServiceDefByName("throw")).thenThrow(new Exception());
		RangerServiceDef serviceDef = mock(RangerServiceDef.class);
		when(_store.getServiceDefByName("good-service")).thenReturn(serviceDef);
	} catch (Exception e) {
		e.printStackTrace();
		Assert.fail("Unexpected exception during mocking!");
	}
	
	Assert.assertNull(_validator.getServiceDef("return null"));
	Assert.assertNull(_validator.getServiceDef("throw"));
	Assert.assertFalse(_validator.getServiceDef("good-service") == null);
}