I want to mock a constructor into method.
public String generaID() { GeneraIDParaEntidadCliente aux = new GeneraIDParaEntidadCliente(nombre, registro
You can use PowerMock to mock constructors.
If you can't use PowerMock for some reason, the most workable solution is to inject a factory to whatever class contains this method. You would then use the factory to create your GeneraIDParaEntidadCliente object and mock the factory.
GeneraIDParaEntidadCliente