Maine net metering battle heads to court