Your cake is done when it starts to pull away from the edges of the pan. The top should be golden brown (for yellow or white cakes) or smooth and matte (for chocolate cake). If using the toothpick test, it should come out come out clean when stuck in the middle.