}
}
try
{
handler.add(new CollectionGraph(Arrays.asList(tripleArray)));
if (!securityEvaluator.evaluate(createAndUpdate,
handler.getModelNode()))
{
Assert.fail("Should have thrown AccessDenied Exception");
}
}
catch (final AccessDeniedException e)
{
if (securityEvaluator.evaluate(createAndUpdate,
handler.getModelNode()))
{
Assert.fail(String
.format("Should not have thrown AccessDenied Exception: %s - %s",
e, e.getTriple()));
}
}
try
{
handler.add(new CollectionGraph(Arrays.asList(tripleArray)));
if (!securityEvaluator.evaluate(createAndUpdate,
handler.getModelNode()))
{
Assert.fail("Should have thrown AccessDenied Exception");
}
}
catch (final AccessDeniedException e)
{
if (securityEvaluator.evaluate(createAndUpdate,
handler.getModelNode()))
{
Assert.fail(String
.format("Should not have thrown AccessDenied Exception: %s - %s",
e, e.getTriple()));
}
}
try
{
handler.add(new CollectionGraph(Arrays.asList(tripleArray)), true);
if (!securityEvaluator.evaluate(createAndUpdate,
handler.getModelNode()))
{
Assert.fail("Should have thrown AccessDenied Exception");