define api via tests