A testamentary executor who is a legatee shall be entitled to compensation, unless the testament provides to the contrary. If the legacy and the compensation of the executor together exceed the disposable portion, the executor shall receive only the disposable portion.