Perform the doneness test on the cake before removing it from the oven. Insert a toothpick in the center of the cake and take it out and see if the better is stuck to the toothpick or not. If the toothpick comes out clean, the cake is done.