added unit tests for function not allowed