encode interface tested