Modify test to perform exception check correctly.

Obsoleted first argument of MemoryBuffer constructor again, since it can be dangerous to instantiate 0-byte memory buffer and trying to write into it later.